Skip to content

Commit d26651b

Browse files
sserrataclaude
andcommitted
feat(ci): enable npm trusted publishing for release workflow
Replace long-lived NPM_AUTH_TOKEN with OIDC-based trusted publishing. Adds id-token: write permission so GitHub Actions can generate short-lived OIDC tokens that npm exchanges for publish credentials automatically. Also bumps Node to 22 as required by npm trusted publishing (needs npm CLI 11.5.1+ and Node 22.14.0+). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d0d0d0b commit d26651b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111

1212
permissions:
1313
contents: write
14+
id-token: write
1415

1516
jobs:
1617
release:
@@ -26,10 +27,9 @@ jobs:
2627
git config user.email "github-actions[bot]@users.noreply.github.com"
2728
- uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2
2829
with:
29-
node-version: "20"
30+
node-version: "22"
3031
registry-url: "https://registry.npmjs.org"
3132
- name: Release
3233
run: npx ts-node --transpile-only scripts/publish.ts
3334
env:
3435
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)