lidge-jun/codexclaw / plugins/codexclaw/skills/dev-devops
cxc-dev-devops
VerifiedUse for infra, CI/CD, releases, repo policy, worktree cleanup and native desktop apps. Triggers: Dockerfile, K8s, IaC, SRE, Tauri, 스택 PR CI, 배포, 인프라, 쿠버네티스, 브랜치 정리, 브랜치 삭제, 워크트리 정리, 저장소 세팅, 브랜치 보호, 에이전트 PR, PR 정책, 데스크톱 앱, 메뉴 막대.
references/package-release.md
View on GitHub# Package Release — Trusted Publishing & Registry Auth
Last reviewed: 2026-07-02
Applies to: npm, PyPI, Bun-to-npm, Homebrew, crates.io, RubyGems, Go modules, GHCR, Docker Hub
When to read: Package publishing, release auth, downstream distribution, CLI package release
Canonical owner: dev-devops package-release guidance
Cross-ref: read `../../dev-security/references/supply-chain-sbom.md` for SBOM/signing depth.
---
## §1 Release Auth Decision Table
Pick the publish path by ecosystem and artifact type before asking for tokens.
| Target | Default path | Token fallback |
|---|---|---|
| npm public package | npm Trusted Publishing/OIDC from GitHub-hosted Actions; use Node 22 and npm 11.5.1+ | `NPM_TOKEN` only when OIDC is unsupported, rejected, or explicitly not configured |
| PyPI package | PyPI Trusted Publisher/OIDC with `pypa/gh-action-pypi-publish@release/v1` | `PYPI_TOKEN` only when Trusted Publisher is unsupported, rejected, or explicitly not configured |
| Bun project publishing to npm | Install/test/build with Bun; publish public npm packages with `npm publish` unless Bun OIDC support is proven in current docs | `NPM_CONFIG_TOKEN` only for explicit `bun publish` fallback |
| Homebrew Formula/Cask | Downstream channel after canonical upstream release exists | GitHub/token auth only for tap automation; never replaces upstream provenance |
| crates.io | Trusted Publishing/OIDC when configured | crates.io API token only when trusted publishing is unavailable |
| RubyGems | Trusted Publishing/OIDC with `rubygems/release-gem` when configured | `RUBYGEMS_API_KEY` only when trusted publishing is unavailable |
| Go modules | VCS tag release; no central registry publish token | Host credentials only for creating tags/releases |
| GHCR | GitHub Actions `GITHUB_TOKEN` with `packages: write` for repository packages | PAT only for cross-repo/private cases that `GITHUB_TOKEN` cannot cover |
| Docker Hub | Docker access token via `docker/login-action` | No OIDC default for ordinary Docker Hub push; use least-scoped token |
## §2 Auth Model Classes
| Class | Examples | Rule |
|---|---|---|
| Registry-native trusted publishing | npm, PyPI, RubyGems, crates.io | Prefer OIDC/trusted publishing before long-lived tokens |
| Cloud IAM federation | AWS ECR, Google Artifact Registry, Azure Container Registry | OIDC authenticates to cloud IAM; registry push uses cloud-issued temporary credentials |
| Repository-scoped CI token | GHCR through `GITHUB_TOKEN` | Prefer built-in short-lived CI token when it has enough scope |
| VCS tag release | Go modules | Verify tags and module paths, not registry credentials |
| Long-lived registry token | Docker Hub, unsupported fallback cases | Require explicit justification, least scope, and rotation owner |
## §3 npm Trusted Publishing
Default for public npm packages released from GitHub Actions:
```yaml
name: publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm publish --provenance
```
Rules:
- State in prose that npm Trusted Publishing requires Node 22.14+ and npm
11.5.1+.
- Use GitHub-hosted runners unless the current npm docs support the alternate
runner.
- Do not ask for `NPM_TOKEN` until trusted publishing is unsupported or rejected.
- For private dependency install inside Docker builds, use BuildKit secrets;
that is not the same as public package publishing.
## §4 PyPI Trusted Publisher
Default for PyPI release from GitHub Actions:
```yaml
name: publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
```
Rules:
- Do not pass username/password/API token in the trusted-publisher job.
- Prefer a GitHub Environment for publish approval and PyPI publisher binding.
- If using `uv publish` inside a trusted publisher environment, credentials do
not need to be set; token auth is a non-trusted fallback.
## §5 Bun-to-npm
Use Bun for project-native install, test, and build:
```yaml
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun test
- run: bun run build
```
For public npm registry publishing with OIDC, switch to Node/npm for the publish
step unless current Bun docs prove equivalent trusted-publishing support:
```yaml
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: https://registry.npmjs.org
- run: npm publish --provenance
```
`bun publish` is acceptable only for dry-run/package inspection or for an
explicit token fallback path after documenting why npm Trusted Publishing is not
used.
## §6 Downstream and Container Channels
| Channel | Guidance |
|---|---|
| Homebrew | Downstream distribution after canonical artifact exists; read `homebrew.md` for Formula/Cask detail |
| GHCR | Use `GITHUB_TOKEN` with `packages: write` for same-repo packages |
| Docker Hub | Use Docker access token; rotate and scope it because ordinary Docker Hub push is token-first |
| ECR/GAR/ACR | Treat as cloud IAM federation, not registry-native trusted publishing |
## §7 Release Proof Bundle
Every package-release answer should collect:
- registry and artifact type;
- chosen auth model and fallback reason if a token is used;
- release runtime version and compatibility matrix distinction;
- provenance/SBOM/signing evidence or explicit reason it does not apply;
- install smoke command for published package or packed artifact;
- downstream channel alignment when Homebrew, containers, or tags are involved.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |