Skip to content

Commit 6de04f3

Browse files
authored
feat(ci): migrate to npm OIDC trusted publishing (#390)
Replace classic npm token authentication with OIDC trusted publishing: - Add `id-token: write` permission for OIDC token generation - Upgrade to Node 24 (includes npm 11.5.1+ required for OIDC) - Remove NPM_TOKEN/NODE_AUTH_TOKEN env vars (OIDC replaces them) This eliminates the need for rotating npm access tokens and provides cryptographically verified publisher identity with automatic provenance attestation. Requires configuring trusted publisher on npmjs.com: - Organization: Fission-AI - Repository: OpenSpec - Workflow: release-prepare.yml
1 parent c2a1a4c commit 6de04f3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/release-prepare.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
permissions:
88
contents: write
99
pull-requests: write
10+
id-token: write # Required for npm OIDC trusted publishing
1011

1112
concurrency:
1213
group: release-${{ github.ref }}
@@ -27,11 +28,9 @@ jobs:
2728

2829
- uses: actions/setup-node@v4
2930
with:
30-
node-version: '20'
31+
node-version: '24' # Node 24 includes npm 11.5.1+ required for OIDC
3132
cache: 'pnpm'
3233
registry-url: 'https://registry.npmjs.org'
33-
scope: '@fission-ai'
34-
always-auth: true
3534

3635
- run: pnpm install --frozen-lockfile
3736

@@ -46,5 +45,4 @@ jobs:
4645
publish: pnpm run release:ci
4746
env:
4847
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
# npm authentication handled via OIDC trusted publishing (no token needed)

0 commit comments

Comments
 (0)