Skip to content

fix(release): use setup-node@v6 with registry-url for OIDC trusted publishing#240

Merged
cipolleschi merged 1 commit into
0.87-stablefrom
fix/release-setup-node-v6-oidc
Jul 8, 2026
Merged

fix(release): use setup-node@v6 with registry-url for OIDC trusted publishing#240
cipolleschi merged 1 commit into
0.87-stablefrom
fix/release-setup-node-v6-oidc

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Root cause (confirmed against the official setup-node docs)

The diagnostic in #238 proved id-token: write is granted (OIDC token is available) and npm is 11.16.0 — both fine. The real problem is the actions/setup-node version: the workflow pins @v4.0.0, which predates npm trusted-publishing support.

The official setup-node OIDC example uses setup-node@v6 + registry-url + no token.

Change

Supersedes #239 (the debug-log diagnostic is no longer needed).

Still required on npmjs.com

The trusted publisher must match the run identity exactly, or npm returns E404 even though the package exists: org react-native-community, repo template, workflow file release.yaml, environment npm-publish.

…blishing

The E404/ENEEDAUTH failures were because actions/setup-node@v4 predates npm trusted-publishing support: with registry-url it wrote a placeholder NODE_AUTH_TOKEN (npm used the bogus token -> E404), and without registry-url npm had no registry configured for the OIDC exchange (-> ENEEDAUTH).

Match the official setup-node OIDC example:
- bump actions/setup-node@v4.0.0 -> @v6 (adds trusted-publishing support)
- keep registry-url: https://registry.npmjs.org
- package-manager-cache: false (avoid leaking the OIDC token via a poisoned cache)
- no NODE_AUTH_TOKEN

Also removes the temporary OIDC diagnostic step.
@cipolleschi cipolleschi merged commit 873e347 into 0.87-stable Jul 8, 2026
1 check passed
@cipolleschi cipolleschi deleted the fix/release-setup-node-v6-oidc branch July 8, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant