ci(release): switch npm publish to trusted publishing

This commit is contained in:
Kieran Klaassen
2026-03-02 21:06:02 -08:00
parent 168c946033
commit f5e2f257eb

View File

@@ -28,10 +28,12 @@ jobs:
- name: Setup Node.js for npm publish - name: Setup Node.js for npm publish
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" # npm trusted publishing requires Node 22.14.0+.
node-version: "24"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- name: Publish to npm - name: Publish to npm
run: npm publish --provenance --access public # With npm trusted publishing configured, npm exchanges the GitHub OIDC
env: # token for a short-lived publish credential. No long-lived NPM token
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # or manual OTP is required.
run: npm publish --access public