Skip to content

feat: add zip archives for Windows releases to support winget#9589

Open
mateenali66 wants to merge 4 commits intovelero-io:mainfrom
mateenali66:feat/add-zip-release-windows
Open

feat: add zip archives for Windows releases to support winget#9589
mateenali66 wants to merge 4 commits intovelero-io:mainfrom
mateenali66:feat/add-zip-release-windows

Conversation

@mateenali66
Copy link
Copy Markdown

Summary

Fixes #9093

Velero releases are currently distributed only as .tar.gz archives. 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 .zip format archives for Windows builds using goreleaser's format_overrides. This is the standard goreleaser approach and has no impact on existing Linux/macOS releases.

Changes

  • .goreleaser.yml: added format_overrides to produce .zip for windows builds

Verification

The pr-goreleaser.yml CI workflow will validate the goreleaser configuration.

Signed-off-by: Mateen Anjum mateenali66@gmail.com

Comment thread .goreleaser.yml Outdated
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
format: zip
format: ["zip", "tar.gz"]

This would be less of a breaking change IMO.

Copy link
Copy Markdown
Collaborator

@kaovilai kaovilai Mar 25, 2026

Choose a reason for hiding this comment

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

Why the revert? 5648550

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok. so if others agree, we could bump to goreleaser v2 here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown

codecov Bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mateenali66
Copy link
Copy Markdown
Author

Good call @kaovilai — updated to formats: ["zip", "tar.gz"] to produce both archive types for all platforms rather than overriding Windows only. Also added the missing changelog entry.

kaovilai
kaovilai previously approved these changes Mar 10, 2026
@mateenali66 mateenali66 reopened this Mar 14, 2026
@github-actions github-actions Bot requested a review from anshulahuja98 March 14, 2026 05:17
@mateenali66
Copy link
Copy Markdown
Author

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.

@kaovilai
Copy link
Copy Markdown
Collaborator

It's kubecon week 😬

@mateenali66
Copy link
Copy Markdown
Author

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.

kaovilai
kaovilai previously approved these changes Mar 27, 2026
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>
@mateenali66
Copy link
Copy Markdown
Author

Thank you for approving @kaovilai

@blackpiglet whenever you have time, requesting your review on this PR.

@mateenali66
Copy link
Copy Markdown
Author

@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.

@kaovilai
Copy link
Copy Markdown
Collaborator

For 1.18 yes for 1.19 it's quite a few months away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish releases to winget-pkgs

2 participants