Skip to content

ci: add Windows (x86_64-pc-windows-msvc) CLI release binary#2033

Merged
madmax983 merged 2 commits into
trunk-devfrom
ci/windows-cli-release
Jul 17, 2026
Merged

ci: add Windows (x86_64-pc-windows-msvc) CLI release binary#2033
madmax983 merged 2 commits into
trunk-devfrom
ci/windows-cli-release

Conversation

@madmax983

Copy link
Copy Markdown
Owner

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-latest matrix leg publishes autumn-x86_64-pc-windows-msvc.zip + its .sha256 checksum on each tagged release, plus a scripts/install.ps1 PowerShell installer (the Windows counterpart to scripts/install.sh).

How

  • Native windows-latest matrix leg (cross: false) for x86_64-pc-windows-msvc — proven buildable since autumn-cli already passes cargo test --workspace on windows-latest in ci.yml; cross is Linux-container-only, so Windows builds natively.
  • .zip packaging via PowerShell (Compress-Archive — Git-bash on windows-latest has no zip) with a sha256sum-format checksum from Get-FileHash. The existing tarball step is gated if: runner.os != 'Windows', and the artifact/release-upload steps use a autumn-<target>.* glob so both .tar.gz and .zip assets are covered. fail-fast: false and the workflow_call/workflow_dispatch + release.yml coupling are unchanged.
  • scripts/install.ps1 downloads the zip from Releases, verifies the sha256, extracts autumn.exe to %LOCALAPPDATA%\autumn\bin, and prints PATH guidance (-Version / -Dir overrides). README gains a Windows install subsection.

Part of #2005.

Validation pending: needs a windows-latest run of cli-release.yml via workflow_dispatch (artifact-only) to prove packaging — runners are starved today; keep draft until green.


Generated by Claude Code

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/install.ps1 Outdated
Comment on lines +74 to +79
$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`""
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using setx PATH ... with $env:PATH is highly discouraged and dangerous for two reasons:

  1. Truncation: setx has a strict limit of 1024 characters. If the combined PATH exceeds this limit, it will silently truncate the PATH, corrupting it.
  2. System Path Pollution: $env:PATH contains both User and System paths. Using setx PATH writes all of these into the User-level PATH variable, 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')"
    }

Comment thread scripts/install.ps1
Comment on lines +34 to +35
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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

@madmax983
madmax983 marked this pull request as ready for review July 17, 2026 11:53
@madmax983
madmax983 merged commit e2cbb1d into trunk-dev Jul 17, 2026
18 of 23 checks passed
@madmax983
madmax983 deleted the ci/windows-cli-release branch July 17, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants