fix: update release workflow to use Node.js 22 for semantic-release#333
Merged
PetyaMarkovaBogdanova merged 2 commits intomasterfrom Mar 30, 2026
Merged
Conversation
semantic-release now requires Node.js ^22.14.0 || >= 24.10.0, but the release workflow relied on the default Node.js version shipped with ubuntu-latest (v20.x), causing the release job to fail. - Add actions/setup-node@v6 with node-version 22 - Update actions/checkout from v2 to v6
The bump-version action failed when re-running for the same version because the remote branch already existed. Now it deletes the existing remote branch before pushing, and uses `checkout -B` to force-create the local branch. Also updates the action runtime from node16 (deprecated) to node20.
fcda525 to
3ee0c9f
Compare
PetyaMarkovaBogdanova
approved these changes
Mar 30, 2026
Contributor
|
🎉 This PR is included in version 1.9.0 🎉 The release is available on GitHub release 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.
Summary
semantic-releasenow requires Node.js^22.14.0 || >= 24.10.0, but the release workflow relied on the default Node.js version shipped withubuntu-latest(v20.x), causing the release job to fail.actions/setup-node@v6withnode-version: 22to satisfy the requirement.actions/checkoutfrom v2 to v6.checkout -Bto force-create the local branch.node16tonode20.Test plan
workflow_dispatchand verify it passesLocal verification (via
act)actions/checkout@v6works correctlyactions/setup-node@v6installs Node.js v22.22.2npm cisucceeds under Node 22semantic-release --dry-runruns without the Node version errorgit checkout -Bcreates branch from scratchgit checkout -Bre-creates branch that already exists (re-run scenario)git push origin --deletefails gracefully when branch doesn't exist on remoteactcontainer lacks Chrome; works on GitHub runner)