Skip to content

Commit 2491bee

Browse files
killaguclaude
andauthored
feat(ci): use npm trusted publishing with OIDC (#5806)
## Summary - Switch release workflow from static npm tokens to OIDC-based trusted publishing - npm CLI auto-detects OIDC environment, no `NODE_AUTH_TOKEN` needed - Provenance attestation is automatically generated - Add `--access public` for automatic first-time publishing of new scoped packages ## Required npm configuration Each package needs trusted publisher configured on npmjs.com: - Settings → Trusted Publisher → GitHub Actions - Organization: `eggjs`, Repository: `egg`, Workflow: `release.yml` ## Test plan - [ ] Configure trusted publisher on npmjs.com for all packages - [ ] Trigger Manual Release workflow with dry_run to verify - [ ] Trigger Manual Release workflow for full release 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Publish workflow now uses public access for dry-run and real publishes. * Real publishes include verbose logging and attach provenance metadata. * **Releases** * Many packages, plugins, and tools received patch/beta version bumps across the monorepo (metadata-only). <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1424058 commit 2491bee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ jobs:
116116
echo "🧪 Running publish in dry-run mode..."
117117
if [[ "${{ github.event.inputs.version_type }}" == pre* ]]; then
118118
echo "Setting npm tag to: ${{ github.event.inputs.prerelease_tag }}"
119-
pnpm -r publish --dry-run --no-git-checks --tag=${{ github.event.inputs.prerelease_tag }}
119+
pnpm -r publish --dry-run --no-git-checks --access public --tag=${{ github.event.inputs.prerelease_tag }}
120120
else
121121
echo "Setting npm tag to: latest"
122-
pnpm -r publish --dry-run --no-git-checks --tag=latest
122+
pnpm -r publish --dry-run --no-git-checks --access public --tag=latest
123123
fi
124124
125125
- name: Publish packages
@@ -128,10 +128,10 @@ jobs:
128128
echo "📦 Publishing packages..."
129129
if [[ "${{ github.event.inputs.version_type }}" == pre* ]]; then
130130
echo "Setting npm tag to: ${{ github.event.inputs.prerelease_tag }}"
131-
pnpm -r publish --no-git-checks --tag=${{ github.event.inputs.prerelease_tag }}
131+
NPM_CONFIG_LOGLEVEL=verbose pnpm -r publish --no-git-checks --access public --provenance --tag=${{ github.event.inputs.prerelease_tag }} || tail -n 100 ~/.npm/_logs/*.log && exit 1
132132
else
133133
echo "Setting npm tag to: latest"
134-
pnpm -r publish --no-git-checks --tag=latest
134+
NPM_CONFIG_LOGLEVEL=verbose pnpm -r publish --no-git-checks --access public --provenance --tag=latest || tail -n 100 ~/.npm/_logs/*.log || tail -n 100 ~/.npm/_logs/*.log && exit 1
135135
fi
136136
137137
- name: Create GitHub Release (draft)

0 commit comments

Comments
 (0)