fix(ci): use Node 24 for npm OIDC trusted publishing#89
Merged
Conversation
Node 22 on GitHub's hosted runners currently pins to a broken npm 10.9.7 whose internal `promise-retry` module is missing from the toolcache (runner-images#13883, nodejs/node#62430). Self-upgrading via `npm install -g npm@latest` crashes before the install can run, because `@npmcli/arborist` cannot start without that module. Node 24 LTS bundles npm 11.x natively, which supports OIDC trusted publishing out of the box (minimum is 11.5.1, per npm docs). Bumping the runtime lets us delete the fragile upgrade step entirely. Test: tag `v0.7.4-rc.2` after merge to validate the flow publishes successfully with provenance.
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
First two OIDC test publishes failed due to two compounding issues:
v0.7.4-rc.0: Node 22 ships with npm 10.x, which doesn't know how to exchange GitHub OIDC for a registry token. Registry PUT returned 404.v0.7.4-rc.1: Addednpm install -g npm@latestbut hit a known GitHub runner-image bug where Node 22.22.2 ships with a broken npm 10.9.7 missingpromise-retry. Self-upgrade crashes before install runs.Validator report (fresh-session, researched sources):
actions/runner-images#13883documents the bugnodejs/node#62430is the upstream trackerFix
Bump
node-versionfrom'22'to'24'and delete the upgrade step. Node 24 LTS bundles npm 11.x, which supports OIDC trusted publishing natively. One change, zero workarounds.Test plan
0.7.4-rc.2