Skip to content

Commit b53bd8b

Browse files
committed
ci(release): upgrade npm to 11.x + drop NODE_AUTH_TOKEN for Trusted Publishing
Trusted Publishing (OIDC) is configured on npmjs for opencode-sdlc-wizard, but the workflow was still passing NODE_AUTH_TOKEN from a (now deleted / broken) NPM_TOKEN secret. npm CLI sees the env var first and uses token-auth path, which 404s. Two fixes: 1. node 22 ships npm 10.x; Trusted Publishing OIDC auth requires npm >= 11.5.1. Added a global npm@latest install step. 2. Removed the NODE_AUTH_TOKEN env on the publish step so the CLI falls through to OIDC. The trusted publisher config on the npm side (BaseInfinity/opencode-sdlc-wizard + release.yml) authorizes this workflow's OIDC token for publish without any long-lived secret. Workflow needs to be re-dispatched against tag v0.8.9 to pick up this fix (release.yml runs from main on workflow_dispatch but checks out the tagged ref for the package contents).
1 parent d9a8ec0 commit b53bd8b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ jobs:
5151
node-version: 22
5252
registry-url: https://registry.npmjs.org
5353

54+
# Trusted Publishing requires npm >= 11.5.1. node 22 ships with 10.x,
55+
# so upgrade before publishing. OIDC flow then auths via the trusted
56+
# publisher configured at npmjs.com/package/<name>/access.
57+
- name: Upgrade npm for Trusted Publishing
58+
run: npm install -g npm@latest
59+
5460
- name: Run tests
5561
run: npm test
5662

5763
- name: Publish to npm
5864
run: npm publish --provenance --access public
59-
env:
60-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6165

6266
- name: Create GitHub Release
6367
run: gh release create "$TAG_NAME" --generate-notes

0 commit comments

Comments
 (0)