Skip to content

Commit 1dce20e

Browse files
ci(release): switch npm publish to OIDC trusted publishing
NPM_TOKEN secret was never configured, so tag-triggered releases failed with ENEEDAUTH. Auth now uses npm trusted publishing (configured on npmjs.com for this repo + release.yaml): - drop NODE_AUTH_TOKEN env (empty token would shadow OIDC auth) - upgrade npm to >= 11.5.1 (trusted publishing requirement; Node 22 bundles 10.x) - bump checkout/setup-node to v5 ahead of the June 16 Node 20 runner cutoff
1 parent a8c5e27 commit 1dce20e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ jobs:
99
contents: read
1010
id-token: write # npm provenance
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-node@v5
1414
with:
1515
node-version: 22
1616
registry-url: 'https://registry.npmjs.org'
17+
# npm trusted publishing (OIDC) requires npm >= 11.5.1; Node 22 bundles npm 10.x
18+
- run: npm install -g npm@latest
1719
- run: npm ci
1820
- run: npm run lint
1921
- run: npm run typecheck
2022
- run: npm run format:check
2123
- run: npm run test:coverage
2224
- run: npm run build
25+
# Auth via npm trusted publishing (OIDC) — no token needed; provenance is implied
2326
- run: npm publish --provenance --access public
24-
env:
25-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)