Skip to content

ci: pin release to Node 24 LTS, drop npm@latest self-update (fixes sigstore publish failure) - #197

Closed
hiroTamada wants to merge 1 commit into
mainfrom
hypeship/fix-release-npm-node-engine
Closed

ci: pin release to Node 24 LTS, drop npm@latest self-update (fixes sigstore publish failure)#197
hiroTamada wants to merge 1 commit into
mainfrom
hypeship/fix-release-npm-node-engine

Conversation

@hiroTamada

@hiroTamada hiroTamada commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The Release CLI workflow has been failing on the npm publish of @onkernel/cli. This supersedes the interim Node bump in #196.

What was happening

  1. node-version: 'latest' resolved to Node 26.5.0 (a non-LTS "Current" release).
  2. npm install -g npm@latest upgraded the global npm to 12.0.0.
  3. GoReleaser ran npm publish with provenance (required for OIDC trusted publishing), and npm 12 fails to resolve its bundled sigstore module:
npm error code MODULE_NOT_FOUND
npm error Cannot find module 'sigstore'
npm error - .../node_modules/npm/node_modules/libnpmpublish/lib/provenance.js

This is a current npm bug: npm/cli#9722. The GitHub release published, but the npm publish failed.

Fix

  • Pin node-version to 24 (LTS). Node 24 bundles npm ≥ 11.5.1, which is the documented known-good version for npm OIDC trusted publishing and has working provenance/sigstore.
  • Drop the npm install -g npm@latest step — it's redundant on Node 24 and was the source of the broken npm 12.

Note on re-releasing

Tag-triggered runs use the workflow file at the tagged commit. After this merges, re-cut the release tag on updated main (delete + re-push v0.21.0, or tag a fresh commit) so the release runs with the fixed workflow.

Also note the earlier v0.21.0 attempt already created the GitHub release + git tag; that may need cleaning up before re-running so GoReleaser doesn't trip on an existing release.

Testing

Can't exercise the publish path without pushing a tag. Fix is based on npm/cli#9722 (npm 12 sigstore regression) and the documented Node 24 LTS trusted-publishing baseline.

npm@latest now resolves to npm@12, which dropped Node 20 support
(requires ^22.22.2 || ^24.15.0 || >=26.0.0). The release job pinned
Node 20, so `npm install -g npm@latest` failed with EBADENGINE and
skipped GoReleaser. Node 24 is already the actions runtime and ships
npm >= 11.5.1 for OIDC trusted publishing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hiroTamada
hiroTamada marked this pull request as ready for review July 9, 2026 15:58
@hiroTamada hiroTamada closed this Jul 9, 2026
@hiroTamada hiroTamada changed the title ci: bump release Node to 24 so npm@latest installs ci: pin release to Node 24 LTS, drop npm@latest self-update (fixes sigstore publish failure) Jul 9, 2026
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