From 6a9b489ffc04147726ea284b73be64c42beacaaa Mon Sep 17 00:00:00 2001 From: Haozhe Wu Date: Tue, 13 Oct 2026 19:08:40 +0800 Subject: [PATCH] fix(ci): keep Windows installer builds in Windows PowerShell --- .github/workflows/desktop-windows.yml | 4 ++++ desktop/electron/WINDOWS_PACKAGING.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/desktop-windows.yml b/.github/workflows/desktop-windows.yml index 0827abd2..fe2379db 100644 --- a/.github/workflows/desktop-windows.yml +++ b/.github/workflows/desktop-windows.yml @@ -100,6 +100,10 @@ jobs: - name: Build NSIS installer working-directory: desktop/electron + # runtime:win starts Windows PowerShell. Keep its parent in the same + # edition: inheriting pwsh's module path through npm hid Get-FileHash + # on windows-2025 even though the direct runtime build above succeeded. + shell: powershell env: CSC_IDENTITY_AUTO_DISCOVERY: "false" run: npm run installer:win:review diff --git a/desktop/electron/WINDOWS_PACKAGING.md b/desktop/electron/WINDOWS_PACKAGING.md index 5b3709c6..a551db56 100644 --- a/desktop/electron/WINDOWS_PACKAGING.md +++ b/desktop/electron/WINDOWS_PACKAGING.md @@ -46,6 +46,9 @@ npm run installer:win:review `installer:win:review` also runs the backend runtime build automatically, so running `npm run runtime:win` separately is optional when using that command. +Run these runtime/installer commands from Windows PowerShell (`powershell.exe`), +as CI does. Starting them from PowerShell 7 can pass its module search path +through npm to the Windows PowerShell child and prevent `Get-FileHash` discovery. The installer and checksum are written under `desktop/electron/release/`. The `installer:win:review` artifact is deliberately unsigned and must never be