Skip to content

Commit a44407b

Browse files
committed
fix(semantic-release-preview): install Node.js so the preview action runs on minimal runners; was silently returning new_release_published=false
1 parent 32ab91a commit a44407b

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/semantic-release-preview.yaml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
runs-on:
77
description: >-
88
Runner label. Defaults to ubuntu-latest. Override to a self-hosted
9-
runner label if you want to run CI on your own scale set.| Runner label. Defaults to ubuntu-latest. Override to a self-hosted
10-
runner label if you want to run CI on your own scale set.| Runner label. Defaults to ubuntu-latest. Override to a self-hosted
119
runner label if you want to run CI on your own scale set.
1210
required: false
1311
default: ubuntu-latest
@@ -39,6 +37,17 @@ jobs:
3937
fetch-depth: 0
4038
persist-credentials: false
4139

40+
# semantic-release-action invokes `npm ci` to install the tool +
41+
# plugins. Minimal self-hosted runner images don't ship Node, so
42+
# without this step npm fails with "/bin/sh: 1: npm: not found" —
43+
# and because the action swallows that error, the preview returns
44+
# new_release_published=false silently, blocking the downstream
45+
# release job. Mirrors the same setup in semantic-release.yaml.
46+
- name: Set up Node.js
47+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v6.0.0
48+
with:
49+
node-version: "22"
50+
4251
- name: Prepare default semantic-release config
4352
shell: bash
4453
run: |

0 commit comments

Comments
 (0)