Skip to content

feat: add zip archives for the Windows builds - #1001

Open
fiodortretyakov wants to merge 2 commits into
launchdarkly:mainfrom
fiodortretyakov:windows-zip-archives
Open

fiodortretyakov wants to merge 2 commits into
launchdarkly:mainfrom
fiodortretyakov:windows-zip-archives

Conversation

@fiodortretyakov

@fiodortretyakov fiodortretyakov commented Oct 31, 2026 •

Copy link
Copy Markdown

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

None in this repository. winget installs archives only from zip files. microsoft/winget-cli#2899 asks for other formats and is still open.

Describe the solution you've provided

Each Windows build now also gets a zip archive, next to its tar.gz archive. The new archives block in .goreleaser.yaml keeps tar.gz for all builds and adds zip for Windows.

With the zip archives, I can add ldcli to winget as a new community package, LaunchDarkly.ldcli, for x86, x64 and arm64. Then winget install LaunchDarkly.ldcli installs the native build on each Windows architecture.

No other part of the release changes:

  • The upload step already includes ./dist/*.zip (fix: tolerate missing *.zip in gh release upload #693).
  • The checksums file lists the zip archives, so the attestation step also attests them.
  • The npm package continues to download the tar.gz archive (goBinary.url in package.json).
  • The Homebrew formula continues to use only the macOS and Linux archives.

Describe alternatives you've considered

  • Zip archives only for Windows. This breaks npm install on Windows, because the npm package downloads the tar.gz archive.
  • The GoReleaser winget publisher. It needs a GitHub token with write access to a fork of microsoft/winget-pkgs. A community package needs only the zip archives from this repository, and a bot can update the package for each release.

Additional context

I ran goreleaser check and goreleaser release --snapshot --skip=docker on Windows on Arm with GoReleaser 2.9.0, 2.12.5 and 2.19.0. The change adds no warning. With 2.19.0, goreleaser check reports the deprecated brews and dockers sections, the same as without this change. Each snapshot made these Windows archives, and its checksums file had an entry for each of them:

ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_386.tar.gz
ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_386.zip
ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_amd64.tar.gz
ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_amd64.zip
ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_arm64.tar.gz
ldcli_3.15.0-SNAPSHOT-66a30c6e_windows_arm64.zip

Each zip archive has the same four files as the tar.gz archive: ldcli.exe, CHANGELOG.md, LICENSE, and README.md. The macOS and Linux builds still get only tar.gz archives. The cross compilers for cgo are only in your goreleaser-cross image. So for the test, I built an empty main package without cgo, and I removed the CC and CXX settings and the post-build hook.


Note

Overview
Windows release artifacts now ship as both tar.gz and zip via a new archives block in .goreleaser.yaml. Default packaging stays tar.gz for macOS and Linux; a format_overrides entry for goos: windows adds zip alongside tar.gz so winget can consume zip-only installs while the npm goBinary.url path keeps using tar.gz on Windows.

No application or install-script logic changes—only GoReleaser archive output for Windows (386, amd64, arm64).

Reviewed by Cursor Bugbot for commit 93569f1. Bugbot is set up for automated code reviews on this repo. Configure here.

@fiodortretyakov
fiodortretyakov requested a review from a team as a code owner October 31, 2026 17:45
@fiodortretyakov
fiodortretyakov requested review from ld-ahartmann and removed request for a team October 31, 2026 17:45
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