Repository navigation
release: v2.3.2 (fix Trusted Publishing OIDC) - #12
Merged
Merged
Conversation
Drop registry-url from actions/setup-node in the release job. With registry-url, setup-node writes an .npmrc with a placeholder NODE_AUTH_TOKEN that npm publish prefers over the OIDC token, producing a misleading 404 'not in this registry' error even though the provenance signs successfully. No code changes vs v2.3.0/v2.3.1; this is purely a release-plumbing fix so that Trusted Publishing actually authenticates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v2.3.1 also failed to publish — the misleading
404 'not in this registry'had a second cause. Withregistry-url: https://registry.npmjs.org/passed toactions/setup-node, setup-node writes an.npmrcwith_authToken=${NODE_AUTH_TOKEN}and exposes a placeholder env varNODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXXto every step.npm publishthen prefers that placeholder token over the OIDC handshake, npm rejects, and we get the 404.The fix is to drop
registry-urlfrom setup-node. npm 10 withid-token: writeperforms the OIDC handshake against the default registry on its own.What was cleaned up
2.3.1and the GitHub Release2.3.1have been deleted (no npm package existed for it, so nothing to break for users).[2.3.1]CHANGELOG entry has been folded into a new[2.3.2]entry with the additional fix described above.Release procedure once this lands
Test plan
2.3.2runs the workflow end to end.npm view undisclosed@2.3.2 versionreturns2.3.2.npm view undisclosed dist-tags.latestreturns2.3.2.