From d3dee05a84023b12d35e5d3467eb1efcac60c1cc Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Tue, 15 Sep 2026 20:47:55 +0200 Subject: [PATCH] ci(nightly): run the version step in bash on Windows (#1609) --- .github/workflows/build-and-make.yaml | 3 +++ .../packaging/configure-linux-frame-copy-build.test.mjs | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/build-and-make.yaml b/.github/workflows/build-and-make.yaml index 7a91c9b8d..632978e3c 100644 --- a/.github/workflows/build-and-make.yaml +++ b/.github/workflows/build-and-make.yaml @@ -495,6 +495,9 @@ jobs: # comes from the nightly-version job so every job of this run # builds the same version. if: needs.nightly-version.outputs.version != '' + # Windows runners default to PowerShell, where "${NIGHTLY_VERSION}" + # expands to nothing and the script rejects the empty version. + shell: bash env: NIGHTLY_VERSION: ${{ needs.nightly-version.outputs.version }} run: node tools/release/nightly-version.mjs --apply --version "${NIGHTLY_VERSION}" diff --git a/tools/packaging/configure-linux-frame-copy-build.test.mjs b/tools/packaging/configure-linux-frame-copy-build.test.mjs index 6ceb14c20..a75b26db3 100644 --- a/tools/packaging/configure-linux-frame-copy-build.test.mjs +++ b/tools/packaging/configure-linux-frame-copy-build.test.mjs @@ -479,6 +479,15 @@ test('keeps non-Linux builds independent from the Linux runtime prerequisite', ( ); assert.equal(linuxJob.strategy['fail-fast'], false); assert.deepEqual(linuxJob.steps, crossPlatformJob.steps); + // Windows runners default to PowerShell, where the bash-style + // "${NIGHTLY_VERSION}" expands to nothing and the version script rejects + // the empty value; the step must pin bash on every host. + const applyNightlyVersion = crossPlatformJob.steps.find( + (step) => step.name === 'Apply nightly version' + ); + assert.ok(applyNightlyVersion); + assert.equal(applyNightlyVersion.shell, 'bash'); + assert.match(applyNightlyVersion.run, /--version "\$\{NIGHTLY_VERSION\}"/); assert.deepEqual(buildWorkflowConfig.jobs['create-release'].needs, [ 'nightly-version', 'build-cross-platform',