diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d7b4dc2e..51ecf7fab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -286,6 +286,12 @@ jobs: node-version: 22 cache: npm + - name: Set up MSVC developer command prompt + if: matrix.name == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + - name: Install deps run: npm ci diff --git a/scripts/github-workflow-build.test.cjs b/scripts/github-workflow-build.test.cjs index 5c09dae63..33bf4c009 100644 --- a/scripts/github-workflow-build.test.cjs +++ b/scripts/github-workflow-build.test.cjs @@ -44,3 +44,12 @@ test("build workflow installs bsdtar for Arch pacman packaging", () => { "both Linux package jobs must install libarchive-tools for pacman metadata generation", ); }); + +test("build workflow initializes MSVC before Windows packaging", () => { + const msvcStep = /name:\s*Set up MSVC developer command prompt[\s\S]*?if:\s*matrix\.name == 'windows'[\s\S]*?uses:\s*ilammy\/msvc-dev-cmd@v1[\s\S]*?arch:\s*x64/; + assert.match( + buildWorkflow, + msvcStep, + "Windows package builds must initialize the MSVC developer prompt so cl.exe is available for the Windows Hello helper", + ); +});