fix(release): restore npm@latest upgrade for tokenless OIDC publish#305
Merged
Conversation
Run #162 reached 'Publish to npm' then failed: the step uses tokenless OIDC Trusted Publishing (no NODE_AUTH_TOKEN; id-token: write set), which requires npm >= 11.5.1. Node 22 ships npm 10.9, which supports --provenance but NOT tokenless trusted publishing. Re-add the 'Upgrade npm' step (removed in the prior fix). npm@latest (v12) installs fine on Node 22 and restores OIDC auth. Node 22 is still required because npm 12 dropped Node 20. Both changes are needed together.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores the npm@latest upgrade step in the Release GitHub Actions workflow so that npm publish --provenance can authenticate via tokenless OIDC Trusted Publishing on Node 22 (where the bundled npm is too old for this auth mode).
Changes:
- Clarifies the Node 22 rationale in
actions/setup-nodeconfiguration comments. - Re-adds an
Upgrade npmstep (npm install -g npm@latest) and a follow-up version print to ensure the publish step runs with a sufficiently new npm.
Deploying ui with
|
| Latest commit: |
d271069
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b5012846.ui-6d0.pages.dev |
| Branch Preview URL: | https://fix-release-npm-oidc-upgrade.ui-6d0.pages.dev |
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.
Problem
Follow-up to #304. That PR fixed the install-time failure (npm 12 won't install on Node 20 → bumped to Node 22) but I also removed the
Upgrade npmstep, assuming it was dead weight. It wasn't.Release run #162 (first run on the Node 22 config) got all the way to
Publish to npmand failed there.@nextis still stuck at0.6.1-dev.159.Root cause:
NODE_AUTH_TOKENand the job setsid-token: write, so it publishes via tokenless npm OIDC Trusted Publishing.--provenancebut not tokenless trusted publishing → auth failure.Upgrade npmstep pulled npm 11.x.Fix
Re-add the
Upgrade npmstep. The correct config needs both changes together:npm 12 installs cleanly on Node 22 and restores OIDC auth; Node 22 is still required because npm 12 dropped Node 20.
Scope / risk
.github/workflows/release.yml. Nosrc/, deps, build config, or exports. Cannot regress any consuming app.After merge
Merging to
maintriggers the Release workflow; the publish step should now authenticate via OIDC and push0.6.1-dev.163+ to@next.