fix(release): use Node 24 bundled npm for OIDC publish, drop global npm upgrade#306
Merged
Merged
Conversation
…pm upgrade Run #163 reached 'Publish to npm' then failed: npm error Cannot find module 'sigstore' from libnpmpublish/lib/provenance.js. The 'npm install -g npm@latest' step left a broken npm dependency tree on the runner (missing bundled sigstore), which breaks 'npm publish --provenance'. Switch to Node 24 (Active LTS), whose bundled npm is 11.x (>=11.5.1): it supports tokenless OIDC Trusted Publishing AND has an intact tree with sigstore present. Remove the global npm upgrade entirely -- it was the source of the broken tree. One change satisfies both the OIDC-version and provenance-deps requirements.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Release GitHub Actions workflow to avoid a fragile global npm upgrade during publishing by switching to a Node version whose bundled npm already supports OIDC Trusted Publishing with --provenance.
Changes:
- Bump
actions/setup-nodefrom Node 22 → 24 to use Node 24’s bundled npm (>= 11.5.1) for tokenless OIDC Trusted Publishing. - Remove the global
npm install -g npm@latestupgrade step (and its follow-up version check) to avoid breaking npm’s dependency tree on the runner.
Deploying ui with
|
| Latest commit: |
5f8c23d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://921dae7a.ui-6d0.pages.dev |
| Branch Preview URL: | https://fix-release-node24-bundled-n.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
Third in the series (#304 → #305 → this). Run #163 (first on the Node 22 +
npm install -g npm@latestconfig from #305) finally reachedPublish to npmand produced a new error:npm 12 did install (the version-check steps passed), but globally upgrading npm on the runner's hostedtoolcache left a broken dependency tree — the bundled
sigstoremodule (needed by--provenance) was missing. This is a known fragility ofnpm install -g npm@lateston top of the preinstalled npm.Fix
Stop upgrading npm globally. Instead pick a Node version whose bundled npm already meets our needs:
node-version22 → 24 (Active LTS "Krypton").Upgrade npmstep entirely.Node 24's bundled npm is 11.x (24.18.0 → npm 11.16.0; every 24.7.0+ ships npm ≥ 11.5.1), which:
One change satisfies both constraints that tripped up the previous two attempts.
Full history
-g→ 12-g→ 12Scope / risk
.github/workflows/release.yml(+7/−13; the fragile global-upgrade step is deleted). Nosrc/, deps, or exports touched.After merge
Merge to
maintriggers the Release workflow; the publish step should authenticate via OIDC with a healthy npm and land0.6.1-dev.<run#>on@next.