ci(release): pin npm and raise .nvmrc so trusted publishing installs - #25
Merged
Conversation
The 2.0.0 release failed before semantic-release ran. The "Update npm to
latest" step installs a floating npm@latest, and npm 12.0.2 raised its Node
floor to ^22.22.2 || ^24.15.0 || >=26.0.0, above the 22.14.0 pinned in
.nvmrc:
npm error code EBADENGINE
npm error Not compatible with your version of node/npm: npm@12.0.2
npm error notsup Actual: {"npm":"10.9.2","node":"v22.14.0"}
The step cannot just be removed. Node 22 bundles npm 10.9.x, which predates
OIDC trusted publishing, so without it @semantic-release/npm has no way to
authenticate.
Pins the npm major instead of tracking latest, so the next time npm raises
its floor it cannot break a release, and moves .nvmrc to 22.23.2 — the
current Node 22 LTS, same major line.
Nothing was published by the failed run: npm is still on 1.1.0 and no v2.0.0
tag exists.
Contributor
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
The 2.0.0 release failed before semantic-release ran (run 33133278023). Nothing was published — npm is still on
1.1.0and there is nov2.0.0tag.What broke
release.ymlinstalls a floatingnpm@latest. npm 12.0.2 raised its Node floor above the22.14.0pinned in.nvmrc:Pre-existing rot rather than a regression from #24 — it would have fired on the next release regardless of what was in it.
The fix
The step cannot simply be dropped: Node 22 bundles npm 10.9.x, which predates OIDC trusted publishing, so
@semantic-release/npmwould have no way to authenticate.npm@^11.5.1) instead of trackinglatest, so a future npm floor bump cannot break a release..nvmrcto 22.23.2, the current Node 22 LTS — same major line, and it also picks up 18 months of security patches. CI and contributor environments read the same file, sonvm installmay be needed locally.Also adds the failure to PUBLISHING.md's troubleshooting section and corrects the Node version in CLAUDE.md.
After merge
This is a
ci:commit, so it produces no bump of its own. Merging it pushes tomain, which triggersrelease.yml, which will then see thefeat/fixcommits already on main from #24 and publish 2.0.0.