Skip to content

fix(release): publish Windows archives as zip - #162

Open
pyroMain404 wants to merge 1 commit into
reyamira:mainfrom
pyroMain404:fix/windows-zip-archives
Open

pyroMain404 wants to merge 1 commit into
reyamira:mainfrom
pyroMain404:fix/windows-zip-archives

Conversation

@pyroMain404

Copy link
Copy Markdown

Closes #161.

What

One format_overrides block in .goreleaser.yml, so goos: windows produces
.zip instead of .tar.gz. Every other platform is untouched.

    format_overrides:
      - goos: windows
        formats: [ zip ]

Why

winget cannot install Pass-CLI today, and no manifest can fix it: the
InstallerType enum in the manifest schema has a zip member and no tar/gzip
one, so there is nothing valid to point at the current Windows release assets.
scoop/pass-cli.json is stuck on the same rock. And .zip is the native archive
format on Windows — right now a user who downloads the asset by hand needs a
third-party tool to open it.

Full reasoning in #161.

Verification

  • goreleaser check with the pinned v2.16.0 (the version in
    .github/workflows/release.yml) reports the config valid. The only complaint is
    the pre-existing brews deprecation, which is identical on main — I diffed
    the output against an unpatched tree.
  • formats (plural) is the current key; GoReleaser v2.16.0 is well past the
    v2.6 rename from the singular format.
  • I could not run a full --snapshot release here (no Go toolchain on this
    machine), so the produced archive names are not empirically confirmed. Worth a
    glance at the next release's asset list — the expected names are
    pass-cli_<version>_windows_x86_64.zip and pass-cli_<version>_windows_arm64.zip.

Follow-up, not in this PR

Once a release carries the .zip assets I have winget manifests ready to submit
to microsoft/winget-pkgs — multi-file format, ManifestVersion 1.10.0,
zip + NestedInstallerType: portable, x64 and arm64, validated against the
official JSON schemas. Happy to open that PR as reyamira.pass-cli, or to hand
the manifests over if you would rather submit them yourselves.

Note that scoop/pass-cli.json will still be wrong after this change: it points
at pass-cli_$version_windows_amd64.zip, but name_template maps amd64 to
x86_64. It also still carries "version": "0.8.51" with v0.0.1 URLs and
placeholder hashes, and states MIT where the repo is Apache-2.0. Left alone
here to keep this PR to one thing; say the word and I will send a separate one.

GoReleaser's default archive format is tar.gz on every platform, so the
Windows release assets ship as .tar.gz. winget cannot consume those: its
InstallerType enum has a zip member and no tar/gzip one, so no valid
winget manifest can point at the current Windows assets. The Scoop
manifest in scoop/ has the same problem, and .zip is in any case the
native archive format on Windows.

Override the format for goos: windows only; every other platform keeps
tar.gz. Archive contents are unchanged.

Refs reyamira#161
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.

Publish Windows archives as .zip so the package can ship on winget (and Scoop)

1 participant