Skip to content

Commit 7631a9d

Browse files
committed
feat: switch to npm OIDC trusted publishing, remove NPM_ACCESS_TOKEN
1 parent 34a8646 commit 7631a9d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
with:
3333
node-version: 24
3434
registry-url: "https://registry.npmjs.org"
35+
package-manager-cache: false # never use caching in release builds
3536
if: ${{ steps.release.outputs.release_created }}
3637

3738
- name: Install dependencies
@@ -46,9 +47,12 @@ jobs:
4647
run: pnpm build
4748
if: ${{ steps.release.outputs.release_created }}
4849

50+
# Trusted publishing via OIDC — no NODE_AUTH_TOKEN needed.
51+
# The npm CLI auto-detects the OIDC environment and exchanges the
52+
# id-token for a short-lived publish credential. Provenance is
53+
# generated automatically.
4954
- name: Publish to npm
5055
run: npm publish --no-git-checks
5156
env:
5257
NODE_ENV: production
53-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
5458
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)