ci: add Windows (x86_64-pc-windows-msvc) CLI release binary#2033
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new PowerShell installer script (scripts/install.ps1) and updates the README.md with instructions for installing prebuilt Windows binaries. Feedback on the script includes a critical recommendation to avoid using setx PATH due to potential truncation and path pollution risks, suggesting a safer .NET registry method instead, along with normalizing paths to prevent false negatives. Additionally, it is recommended to explicitly enable TLS 1.2 to ensure compatibility and prevent connection failures on older Windows environments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| $pathEntries = ($env:PATH -split ';') | ||
| if ($pathEntries -notcontains $Dir) { | ||
| Write-Host "autumn-install: note: $Dir is not on your PATH." | ||
| Write-Host " Add it for the current session: `$env:PATH = `"$Dir;`$env:PATH`"" | ||
| Write-Host " Or persist it for your user: setx PATH `"$Dir;`$env:PATH`"" | ||
| } |
There was a problem hiding this comment.
Using setx PATH ... with $env:PATH is highly discouraged and dangerous for two reasons:
- Truncation:
setxhas a strict limit of 1024 characters. If the combinedPATHexceeds this limit, it will silently truncate thePATH, corrupting it. - System Path Pollution:
$env:PATHcontains both User and System paths. Usingsetx PATHwrites all of these into the User-levelPATHvariable, duplicating them and quickly exceeding the 1024-character limit.
Additionally, comparing paths directly without normalizing trailing backslashes can lead to false negatives (e.g., if PATH contains ...\bin\ but $Dir is ...\bin).
We can resolve both issues by normalizing the paths and recommending the safe .NET registry method for persisting the user PATH.
$pathEntries = ($env:PATH -split ';') | ForEach-Object { $_.TrimEnd('\') }
$normalizedDir = $Dir.TrimEnd('\')
if ($pathEntries -notcontains $normalizedDir) {
Write-Host "autumn-install: note: $Dir is not on your PATH."
Write-Host " Add it for the current session: `$env:PATH = `"$Dir;`$env:PATH`""
Write-Host " Or persist it for your user:"
Write-Host " [Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'User') + ';$Dir', 'User')"
}
| $ErrorActionPreference = 'Stop' | ||
| Set-StrictMode -Version Latest |
There was a problem hiding this comment.
On older Windows clients (such as Windows 10 or Windows Server 2016 running Windows PowerShell 5.1), TLS 1.2 is often not enabled by default for .NET network connections. This can cause Invoke-WebRequest to fail with SSL/TLS connection errors when downloading from GitHub. Explicitly enabling TLS 1.2 at the start of the script ensures compatibility.
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
Before / After
Before: the CLI release workflow ships only Linux-musl (x86_64 + aarch64) and macOS (x86_64 + aarch64) binaries. Windows users have no download — they must build from source.
After: a native
windows-latestmatrix leg publishesautumn-x86_64-pc-windows-msvc.zip+ its.sha256checksum on each tagged release, plus ascripts/install.ps1PowerShell installer (the Windows counterpart toscripts/install.sh).How
windows-latestmatrix leg (cross: false) forx86_64-pc-windows-msvc— proven buildable sinceautumn-clialready passescargo test --workspaceonwindows-latestinci.yml;crossis Linux-container-only, so Windows builds natively..zippackaging via PowerShell (Compress-Archive— Git-bash onwindows-latesthas nozip) with asha256sum-format checksum fromGet-FileHash. The existing tarball step is gatedif: runner.os != 'Windows', and the artifact/release-upload steps use aautumn-<target>.*glob so both.tar.gzand.zipassets are covered.fail-fast: falseand theworkflow_call/workflow_dispatch+release.ymlcoupling are unchanged.scripts/install.ps1downloads the zip from Releases, verifies the sha256, extractsautumn.exeto%LOCALAPPDATA%\autumn\bin, and prints PATH guidance (-Version/-Diroverrides). README gains a Windows install subsection.Part of #2005.
Validation pending: needs a
windows-latestrun ofcli-release.ymlviaworkflow_dispatch(artifact-only) to prove packaging — runners are starved today; keep draft until green.Generated by Claude Code