ci: publish to npm through trusted publishing instead of a token - #514
Open
us wants to merge 1 commit into
Open
Conversation
The granular NPM_TOKEN expired after 90 days and the 0.34.0 release failed its npm jobs with E404 on PUT. Trusted publishing authenticates the workflow itself through OIDC, so there is no secret to rotate. The two npm jobs get id-token: write, drop NODE_AUTH_TOKEN, and update npm to a version that supports it (11.5.1 or later; the npm bundled with Node 22 is older). Each package needs its trusted publisher entry on npmjs.com once (user us, repository crw, workflow release.yml); RELEASE.md lists the packages.
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.
What changed
publish-npmandpublish-npm-sdkgetid-token: write, dropNODE_AUTH_TOKEN, and update npm to a version that supports trusted publishing (11.5.1 or later; the npm bundled with Node 22 is older).RELEASE.mddescribes the per-package setup and drops the token from the secret rotation table.Why
The granular
NPM_TOKENexpired after 90 days and the 0.34.0 release failed both npm jobs withE404 PUT. Trusted publishing authenticates the workflow itself through OIDC, so there is nothing to rotate.Before merging
Each package needs its trusted publisher entry on npmjs.com once:
crw-mcp,crw-mcp-darwin-arm64,crw-mcp-darwin-x64,crw-mcp-linux-arm64,crw-mcp-linux-x64,crw-sdk(userus, repositorycrw, workflow filenamerelease.yml, no environment). After the merge, rerun the failed jobs of the 0.34.0 release run.