Skip to content

fix: remove npm@latest upgrade from release workflow - #1

Closed
RAZKOM wants to merge 1 commit into
mainfrom
cursor/fix-release-workflow-npm-upgrade-e0c0
Closed

fix: remove npm@latest upgrade from release workflow#1
RAZKOM wants to merge 1 commit into
mainfrom
cursor/fix-release-workflow-npm-upgrade-e0c0

Conversation

@RAZKOM

@RAZKOM RAZKOM commented Sep 10, 2026

Copy link
Copy Markdown
Member

Problem

The build-and-publish job in the Release workflow fails when triggered by tag pushes:

npm install -g npm@latest

Error: npm@12.0.2 requires Node ^22.22.2 || ^24.15.0 || >=26.0.0, but the workflow uses node-version: "20.x" (runner had v20.20.2 / npm 10.8.2).

Solution

Removed the step that upgrades to npm@latest. Node 20's bundled npm 10 already supports npm publish --provenance with OIDC authentication, making the upgrade unnecessary.

The comment "required for OIDC" was outdated for the current setup-node + npm 10 combination.

Changes

  • Removed the Install latest npm (required for OIDC) step from .github/workflows/release.yml
  • No other changes to the release workflow (tag/version check, tests, registry check, and publish logic remain unchanged)

Testing

The workflow will be validated on the next tag push. All existing release steps remain functional with Node 20's bundled npm 10.8.2.

Open in Web Open in Cursor 

The step 'Install latest npm (required for OIDC)' fails because npm@latest
(12.0.2) requires Node ^22.22.2 || ^24.15.0 || >=26.0.0, but the workflow
uses Node 20.x which bundles npm 10.8.2.

Node 20's bundled npm 10 already supports 'npm publish --provenance' with
OIDC, so the upgrade step is unnecessary. Remove it to fix the release build.

Co-authored-by: RAZKOM <RAZKOM@users.noreply.github.com>
@RAZKOM RAZKOM closed this Sep 10, 2026
@RAZKOM
RAZKOM deleted the cursor/fix-release-workflow-npm-upgrade-e0c0 branch September 10, 2026 05:16
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.

2 participants