Skip to content

fix: remove npm self-upgrade step that breaks release CI#838

Merged
m-abdelwahab merged 1 commit intomasterfrom
mahmoud/fix-ci-release
Apr 10, 2026
Merged

fix: remove npm self-upgrade step that breaks release CI#838
m-abdelwahab merged 1 commit intomasterfrom
mahmoud/fix-ci-release

Conversation

@m-abdelwahab
Copy link
Copy Markdown
Collaborator

Summary

  • Removes the npm install -g npm@latest step from the "Publish NPM" job in the release workflow
  • This step started failing because npm@latest now resolves to npm 11.x, which causes a fatal cross-major self-upgrade when the runner bundles npm 10.x (Node 22). npm removes its own dependencies (like promise-retry) mid-install, leaving itself corrupted.
  • The step is no longer needed — Node 22 ships with npm 10.9.7, which has had OIDC/provenance support since npm 9.5.0

Context

Test plan

  • Verify next release tag triggers a successful "Publish NPM" job

🤖 Generated with Claude Code

`npm install -g npm@latest` now resolves to npm 11.x, which causes a
fatal cross-major self-upgrade on runners bundling npm 10.x (Node 22).
The step was only needed for OIDC/provenance support, which has been
built into npm since 9.5.0 — Node 22's bundled npm 10.9.7 already
has it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@m-abdelwahab m-abdelwahab force-pushed the mahmoud/fix-ci-release branch from e4adc42 to 1a3a40b Compare April 10, 2026 17:19
@m-abdelwahab m-abdelwahab added the release/patch Author patch release label Apr 10, 2026
@m-abdelwahab m-abdelwahab merged commit 3662262 into master Apr 10, 2026
7 checks passed
@m-abdelwahab m-abdelwahab deleted the mahmoud/fix-ci-release branch April 10, 2026 17:40
m-abdelwahab added a commit that referenced this pull request Apr 13, 2026
The Publish NPM job has been failing since v4.37.0. Root cause: npm 10
(bundled with Node 22) can sign provenance via OIDC but cannot
authenticate the registry upload itself via trusted publishing — that
requires npm >= 11.5.1. With no NODE_AUTH_TOKEN secret configured, the
publish fell through to an anonymous PUT, which the registry rejected
as a 404 (the standard response for scoped packages when auth is
missing).

Bump the runner to Node 24, which bundles npm 11.x, and assert the
version at runtime so any future regression fails loudly instead of
silently falling back. Drop --provenance since trusted publishing
attaches it automatically.

This supersedes #838, which removed the npm self-upgrade step after
npm@latest started cross-major upgrading and corrupting itself
mid-install. Using Node 24's bundled npm avoids both the corruption
and the self-upgrade entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
m-abdelwahab added a commit that referenced this pull request Apr 13, 2026
The Publish NPM job has been failing since v4.37.0. Root cause: npm 10
(bundled with Node 22) can sign provenance via OIDC but cannot
authenticate the registry upload itself via trusted publishing — that
requires npm >= 11.5.1. With no NODE_AUTH_TOKEN secret configured, the
publish fell through to an anonymous PUT, which the registry rejected
as a 404 (the standard response for scoped packages when auth is
missing).

Bump the runner to Node 24, which bundles npm 11.x. Drop --provenance
since trusted publishing attaches it automatically.

This supersedes #838, which removed the npm self-upgrade step after
npm@latest started cross-major upgrading and corrupting itself
mid-install. Using Node 24's bundled npm avoids both the corruption
and the self-upgrade entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
m-abdelwahab added a commit that referenced this pull request Apr 13, 2026
The Publish NPM job has been failing since v4.37.0. Root cause: npm 10
(bundled with Node 22) can sign provenance via OIDC but cannot
authenticate the registry upload itself via trusted publishing — that
requires npm >= 11.5.1. With no NODE_AUTH_TOKEN secret configured, the
publish fell through to an anonymous PUT, which the registry rejected
as a 404 (the standard response for scoped packages when auth is
missing).

Bump the runner to Node 24, which bundles npm 11.x. Drop --provenance
since trusted publishing attaches it automatically.

Also bump actions/setup-node to v6 — v4 runs on Node 20 internally,
which GitHub is deprecating.

This supersedes #838, which removed the npm self-upgrade step after
npm@latest started cross-major upgrading and corrupting itself
mid-install. Using Node 24's bundled npm avoids both the corruption
and the self-upgrade entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
m-abdelwahab added a commit that referenced this pull request Apr 13, 2026
The Publish NPM job has been failing since v4.37.0. Root cause: npm 10
(bundled with Node 22) can sign provenance via OIDC but cannot
authenticate the registry upload itself via trusted publishing — that
requires npm >= 11.5.1. With no NODE_AUTH_TOKEN secret configured, the
publish fell through to an anonymous PUT, which the registry rejected
as a 404 (the standard response for scoped packages when auth is
missing).

Bump the runner to Node 24, which bundles npm 11.x. Drop --provenance
since trusted publishing attaches it automatically.

Also bump actions/setup-node to v6 — v4 runs on Node 20 internally,
which GitHub is deprecating.

This supersedes #838, which removed the npm self-upgrade step after
npm@latest started cross-major upgrading and corrupting itself
mid-install. Using Node 24's bundled npm avoids both the corruption
and the self-upgrade entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
m-abdelwahab added a commit that referenced this pull request Apr 13, 2026
The Publish NPM job has been failing since v4.37.0. Root cause: npm 10
(bundled with Node 22) can sign provenance via OIDC but cannot
authenticate the registry upload itself via trusted publishing — that
requires npm >= 11.5.1. With no NODE_AUTH_TOKEN secret configured, the
publish fell through to an anonymous PUT, which the registry rejected
as a 404 (the standard response for scoped packages when auth is
missing).

Bump the runner to Node 24, which bundles npm 11.x. Drop --provenance
since trusted publishing attaches it automatically.

Also bump actions/setup-node to v6 — v4 runs on Node 20 internally,
which GitHub is deprecating.

This supersedes #838, which removed the npm self-upgrade step after
npm@latest started cross-major upgrading and corrupting itself
mid-install. Using Node 24's bundled npm avoids both the corruption
and the self-upgrade entirely.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Author patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant