From 9aff64e017f23a747da29e32b218cf4d0240b2e2 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 15:31:06 -0800 Subject: [PATCH] upload Windows .exe file artifacts for CLI releases (#6478) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR is to unlock future WinGet installation. WinGet struggles to create command aliases when installing from nested ZIPs on some clients, so adding raw Windows x64/Arm64 executables lets the manifest use InstallerType: portable with direct EXEs, which reliably registers the codex alias. This makes “winget install → codex” work out of the box without PATH changes. --------- Co-authored-by: Michael Bolin --- .github/workflows/rust-release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 26afdaf5..6f27fbf5 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -295,6 +295,15 @@ jobs: # ${{ matrix.target }} dest="dist/${{ matrix.target }}" + # We want to ship the raw Windows executables in the GitHub Release + # in addition to the compressed archives. Keep the originals for + # Windows targets; remove them elsewhere to limit the number of + # artifacts that end up in the GitHub Release. + keep_originals=false + if [[ "${{ matrix.runner }}" == windows* ]]; then + keep_originals=true + fi + # For compatibility with environments that lack the `zstd` tool we # additionally create a `.tar.gz` for all platforms and `.zip` for # Windows alongside every single binary that we publish. The end result is: @@ -324,7 +333,11 @@ jobs: # Also create .zst (existing behaviour) *and* remove the original # uncompressed binary to keep the directory small. - zstd -T0 -19 --rm "$dest/$base" + zstd_args=(-T0 -19) + if [[ "${keep_originals}" == false ]]; then + zstd_args+=(--rm) + fi + zstd "${zstd_args[@]}" "$dest/$base" done - name: Remove signing keychain