Skip to content

Commit 8a866b0

Browse files
committed
ci: switch npm publish to OIDC Trusted Publishing — no token needed
1 parent 5a8a1cf commit 8a866b0

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ jobs:
9191
steps:
9292
- uses: actions/setup-node@v4
9393
with:
94-
node-version: '20'
94+
# Node 22 ships with npm >= 11, required for OIDC Trusted Publishing.
95+
node-version: '22'
9596
registry-url: 'https://registry.npmjs.org'
9697

98+
- name: Ensure latest npm (for OIDC support)
99+
run: npm install -g npm@latest
100+
97101
- name: Download all artifacts
98102
uses: actions/download-artifact@v4
99103
with:
@@ -107,8 +111,6 @@ jobs:
107111
echo "=== Package contents ==="
108112
ls -la publish-pkg/
109113
110-
- name: Publish to npm
114+
- name: Publish to npm (OIDC Trusted Publishing — no token needed)
111115
working-directory: publish-pkg
112-
env:
113-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
114116
run: npm publish --provenance --access public

0 commit comments

Comments
 (0)