feat: add zip archives for Windows releases to support winget#9589
feat: add zip archives for Windows releases to support winget#9589mateenali66 wants to merge 4 commits intovelero-io:mainfrom
Conversation
| wrap_in_directory: true | ||
| format_overrides: | ||
| - goos: windows | ||
| format: zip |
There was a problem hiding this comment.
| format: zip | |
| format: ["zip", "tar.gz"] |
This would be less of a breaking change IMO.
There was a problem hiding this comment.
The formats: ["zip", "tar.gz"] syntax is goreleaser v2. Velero's goreleaser config is on v1.26.2 which only supports format (singular) at the archive level — so the plural form silently falls back to the default and the zip never actually gets produced. format_overrides is the v1 way to get Windows zip while keeping tar.gz as the default for other platforms.
Happy to revisit once there's bandwidth after KubeCon.
There was a problem hiding this comment.
ok. so if others agree, we could bump to goreleaser v2 here.
There was a problem hiding this comment.
happy to do the goreleaser v2 bump as part of this PR if that's the direction. Would that be something you'd want included here, or better as a separate PR first? Either way works for me, just want to make sure the scope is right before pushing more changes.
There was a problem hiding this comment.
I'm ok with either. If separate PRs, go releaser bump going in first is the only way to not have breaking change in-between if a release is triggered.
There was a problem hiding this comment.
Bumped goreleaser to v2.14.3 in the build image and switched .goreleaser.yml to the v2 formats syntax. Both tar.gz and zip will now be produced for all platforms, which is actually cleaner than the format_overrides approach. Let me know if anything looks off.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Good call @kaovilai — updated to |
|
Hi, just wanted to check in on this one. @kaovilai already approved and the suggestion to include both zip and tar.gz formats was implemented in the last commit. Is there anything else needed before this can get a second review? Happy to make any changes if something is blocking it. |
|
It's kubecon week 😬 |
|
Done, bumped goreleaser to v2.14.3 in the build image and switched .goreleaser.yml to the v2 formats syntax. Both tar.gz and zip will now be produced for all platforms, which is actually cleaner than the format_overrides approach. Let me know if anything looks off. |
Adds format_overrides in .goreleaser.yml to produce .zip archives for Windows builds alongside the existing .tar.gz for Linux/macOS. Windows Package Manager (winget) does not support .tar.gz archives, making it impossible to publish Velero to the winget community repository without this change. Uses goreleaser's format_overrides so only Windows gets .zip; Linux and macOS continue to receive .tar.gz only. Also bumps goreleaser in the build image from v1.26.2 to v2.14.3. Fixes velero-io#9093 Signed-off-by: Mateen Anjum <mateenali66@gmail.com>
e434060 to
9c8353f
Compare
|
Thank you for approving @kaovilai @blackpiglet whenever you have time, requesting your review on this PR. |
|
@blackpiglet @anshulahuja98 @kaovilai approved the latest commit on 4/10. the goreleaser-v2 bump is bundled here because kaovilai asked for the v1-before-v2 ordering in a single PR (#9589 (comment)) to avoid a broken release window. if a release cut is coming up, merging this first keeps winget unblocked without a separate image-bump PR in between. would appreciate a second review when either of you has a slot. |
|
For 1.18 yes for 1.19 it's quite a few months away |
Summary
Fixes #9093
Velero releases are currently distributed only as
.tar.gzarchives. Windows Package Manager (winget) does not support.tar.gz(microsoft/winget-cli#2899), making it impossible to publish Velero to the winget community repository.This PR adds
.zipformat archives for Windows builds using goreleaser'sformat_overrides. This is the standard goreleaser approach and has no impact on existing Linux/macOS releases.Changes
.goreleaser.yml: addedformat_overridesto produce.zipforwindowsbuildsVerification
The
pr-goreleaser.ymlCI workflow will validate the goreleaser configuration.Signed-off-by: Mateen Anjum mateenali66@gmail.com