ci: switch release workflow to npm trusted publishing (OIDC)#2157
Merged
Conversation
npm now enforces 2FA on legacy token publishes, causing EOTP failures in CI. Use OIDC trusted publishing instead: grant id-token permission, upgrade npm to >= 11.5.1, and drop the NPM_PUBLISH_TOKEN secret.
|
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
Node 24.16.0 bundles npm 11.13.0, which natively supports trusted publishing (requires npm >= 11.5.1), so the explicit npm upgrade step is no longer needed. All workflows read .nvmrc so CI moves together.
Node 24.16.0 has a readable-stream regression (nodejs/node#63487) that hangs playwright/cypress browser installs during zip extraction. Playwright < 1.60 is affected; pin 24.15.0 until 24.17.0 ships the fix. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
The alpha release job has been failing with
EOTPerrors (example run) — npm now enforces 2FA on publishes authenticated with legacy tokens, so theNPM_PUBLISH_TOKENsecret can no longer publish from CI.This switches the release workflow to npm trusted publishing (OIDC):
permissionsblock withid-token: writeso the job can mint an OIDC token (pluscontents/pull-requests: writefor the changesets release PR flow).nvmrcto Node 24 LTS — trusted publishing requires npm >= 11.5.1, and Node 24 bundles npm 11.x. Notechangeset publish→pnpm publish→npm publishunder the hood (pnpm#9812), so the runner's npm CLI is what performs the OIDC exchange.extract-zip/yauzlregression (nodejs/node#63487) that hangs Playwright (< 1.60) browser installs in CI — confirmed against this very PR before pinning down. Can move forward once 24.17.0 ships the fix (or Playwright is bumped to >= 1.60).NPM_TOKEN/NODE_AUTH_TOKENentirely — changesets/action >= 1.7.0 supports tokenless OIDC publishing (changesets/action#545)actions/checkoutv3 → v4 (v3 runs on Node 20, which GitHub deprecates June 16, 2026)All workflows read
.nvmrc, so tests/typecheck CI moves to Node 24 with this PR (engines remain>=22).Requires trusted publisher config on npmjs.com for both
@solidjs/startand@solidjs/vite-plugin-nitro-2(reposolidjs/solid-start, workflowrelease.yml, no environment, "Allow npm publish" enabled).After merge: delete the
NPM_PUBLISH_TOKENrepo secret and revoke the token on npmjs.com.Test plan