fix: remove npm@latest upgrade from release workflow - #1
Closed
RAZKOM wants to merge 1 commit into
Closed
Conversation
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>
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
The
build-and-publishjob in the Release workflow fails when triggered by tag pushes:Error:
npm@12.0.2requires Node^22.22.2 || ^24.15.0 || >=26.0.0, but the workflow usesnode-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 supportsnpm publish --provenancewith OIDC authentication, making the upgrade unnecessary.The comment "required for OIDC" was outdated for the current setup-node + npm 10 combination.
Changes
Install latest npm (required for OIDC)step from.github/workflows/release.ymlTesting
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.