fix(release): avoid PowerShell crashes on Windows ARM #18573
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/18573/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
juliusmarminge added labelsmacroscope-review
- .github/workflows/release-desktop.yml line 151OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -131 +131,21 @@131131132+ # The runner's PowerShell 7.6/.NET 10 intermittently crashes during signing:133+ # https://github.com/dotnet/runtime/issues/131636134+ # Put the .NET 8 release first for both workflow shells and electron-builder.135+ - name: Use PowerShell 7.4 for Windows ARM builds136+ if: inputs.platform == 'win' && inputs.arch == 'arm64'137+ shell: powershell138+ run: |139+ $ErrorActionPreference = "Stop"140+ $version = "7.4.20"141+ $archive = Join-Path $env:RUNNER_TEMP "PowerShell-$version-win-arm64.zip"142+ $installDir = Join-Path $env:RUNNER_TEMP "powershell-$version-arm64"143+ Invoke-WebRequest -UseBasicParsing `144+ -Uri "https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-arm64.zip" `145+ -OutFile $archive146+ $expectedHash = "67eff749d5dae357501c95a3eec1dcd93f669824e3ca2b1d2adcdecdebf04f35"147+ if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne $expectedHash) {148+ throw "PowerShell archive checksum mismatch"149+ }150+ Expand-Archive -Path $archive -DestinationPath $installDir151+ $installDir >> $env:GITHUB_PATH
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Approvability#
Verdict: Approved at
b53d6f4Macroscope's review found this PR approvable — This is a focused release-workflow fix that pins and verifies PowerShell 7.4.20 only for Windows ARM builds, leaving product behavior and other build paths unchanged. The runtime impact is explicit and bounded to the existing signing/build environment.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).