Repository navigation
ci(npm): publish via npm trusted publishing (GitHub OIDC) - #2791
Merged
Merged
Conversation
Drop NPM_TOKEN from publish-js.yml and publish-wasm.yml. Publish jobs keep id-token: write, ensure npm >= 11.5.1 for the OIDC token exchange, and no longer set setup-node registry-url (its .npmrc carries a placeholder token). Guard with a release-workflow test and document npmjs.com publisher config. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Requested by Михайло · project thread
What changed
Both npm publish lanes (
Publish JSfor@everruns/bashkit,Publish Webfor@everruns/bashkit-wasm) now authenticate with npm trusted publishing over GitHub OIDC instead of theNPM_TOKENsecret.id-token: write;NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}is gone.npm@11.6.2if Node's bundled npm is older.registry-url, because it writes an.npmrcwith a placeholder auth token. npm defaults to registry.npmjs.org.publish_npm.pyis unchanged and still passes--provenance. Trusted publishing attaches provenance automatically either way.NPM_TOKEN,NODE_AUTH_TOKENorregistry-urlfrom coming back, and checks that each publish job hasid-token: write.Why
Publish Webgot a 404 on@everruns/bashkit-wasm@0.20.1. The package exists through 0.19.0 and the publish already passes--access public, so npm is hiding an auth failure. Both lanes read the same secret. Trusted publishing removes the long-lived token, so there is nothing to rotate.Before / After
secrets.NPM_TOKEN, and the rejected token shows up as an E404 on publish.@everruns/bashkiteverrunsbashkitpublish-js.yml@everruns/bashkit-wasmeverrunsbashkitpublish-wasm.ymlLocal:
python3 -m unittest discover -s scripts/tests -p 'test_*.py'passes (184 tests). Against main's workflows the new test fails for both lanes (2 failures).Risk
NPM_TOKENsecret can be deleted.Checklist