Skip to content

fix: update release workflow to use Node.js 22 for semantic-release#333

Merged
PetyaMarkovaBogdanova merged 2 commits intomasterfrom
fix/release-workflow-node-version
Mar 30, 2026
Merged

fix: update release workflow to use Node.js 22 for semantic-release#333
PetyaMarkovaBogdanova merged 2 commits intomasterfrom
fix/release-workflow-node-version

Conversation

@kgogov
Copy link
Copy Markdown
Contributor

@kgogov kgogov commented Mar 25, 2026

Summary

  • 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.
  • Added actions/setup-node@v6 with node-version: 22 to satisfy the requirement.
  • Updated actions/checkout from v2 to v6.
  • Fixed bump-version action failing when re-running for the same version (remote branch already exists). Now deletes the existing remote branch before pushing and uses checkout -B to force-create the local branch.
  • Updated bump-version action runtime from deprecated node16 to node20.

Test plan

  • Trigger the release workflow manually via workflow_dispatch and verify it passes
  • Verify the bump-version step succeeds even if the branch already exists on the remote

Local verification (via act)

  • actions/checkout@v6 works correctly
  • actions/setup-node@v6 installs Node.js v22.22.2
  • npm ci succeeds under Node 22
  • semantic-release --dry-run runs without the Node version error
  • jshint, eslint, less compilation all pass under Node 22
  • bump-version: git checkout -B creates branch from scratch
  • bump-version: git checkout -B re-creates branch that already exists (re-run scenario)
  • bump-version: git push origin --delete fails gracefully when branch doesn't exist on remote
  • Karma browser tests — not testable locally (act container lacks Chrome; works on GitHub runner)

kgogov added 2 commits March 26, 2026 13:20
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.
@kgogov kgogov force-pushed the fix/release-workflow-node-version branch from fcda525 to 3ee0c9f Compare March 26, 2026 11:20
@PetyaMarkovaBogdanova PetyaMarkovaBogdanova merged commit be69296 into master Mar 30, 2026
3 checks passed
@kgogov kgogov deleted the fix/release-workflow-node-version branch March 30, 2026 07:28
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants