Skip to content

ci: publish to npm through trusted publishing instead of a token - #514

Open
us wants to merge 1 commit into
mainfrom
ci/npm-trusted-publishing
Open

ci: publish to npm through trusted publishing instead of a token#514
us wants to merge 1 commit into
mainfrom
ci/npm-trusted-publishing

Conversation

@us

@us us commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What changed

  • publish-npm and publish-npm-sdk get id-token: write, drop NODE_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.md describes the per-package setup and drops the token from the secret rotation table.

Why

The granular NPM_TOKEN expired after 90 days and the 0.34.0 release failed both npm jobs with E404 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 (user us, repository crw, workflow filename release.yml, no environment). After the merge, rerun the failed jobs of the 0.34.0 release run.

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.
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