Repository navigation
Build release binaries with GoReleaser - #44
Merged
Merged
Conversation
Releases will be installable with go install, which needs only a tag, and as ready-built binaries for people without Go. - .goreleaser.yaml builds linux, macOS and Windows binaries for amd64 and arm64 and packs each with LICENSE, README.md and config.yaml.example, plus checksums.txt. There are no -X flags: a binary reports the tag from the build information Go records in it. - .github/workflows/release.yml runs on a pushed vX.Y.Z tag: it runs the tests, builds, adds the archives to the draft release of that version and publishes it with its handwritten notes. Publishing only after the archives are there means a release is never public while incomplete. - A "Check Release Config" job runs goreleaser check on every push. - dist/ is ignored: Go counts untracked files as uncommitted changes and would stamp the binaries +dirty. CLAUDE.md gets a Releasing section with the steps.
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Mailbox Zero will be released as v1.0.0, installable in two ways:
go install github.com/taskinen/mailboxzero@latest, which needs only a version tag;This is the second of three PRs before the release:
Changes
.goreleaser.yaml(GoReleaser v2):CGO_ENABLED=0,-trimpath,-s -w, and a reproducible file time.-Xflags: a binary reports its version from the build information Go records in it, exactly like ago installof the same tag (Prepare the binary for installing: version, example config, config location #43's-version).LICENSE,README.mdandconfig.yaml.exampleinto its own folder:.tar.gz, or.zipfor Windows.checksums.txt.Mailbox Zero vX.Y.Z). GoReleaser adds the archives to the existing draft, keeps its notes and publishes it. Re-runs replace archives already uploaded..github/workflows/release.yml, on a pushedvX.Y.Ztag:go test, with no build cache for release builds;So a release is never public without its binaries.
test.yml: a new "Check Release Config" job runsgoreleaser checkon every push. It takes a few seconds, so a broken.goreleaser.yamlshows up on the PR instead of at release time..gitignore:dist/. Go counts untracked files as uncommitted changes. Without this line, the release binaries would be stamped+dirtyand GoReleaser would refuse to build.CLAUDE.md:
Checked locally (GoReleaser v2.18.3)
goreleaser check: the config is valid.goreleaser release --snapshot --clean:checksums.txt;mailboxzero_<version>_<os>_<arch>/with the binary,LICENSE,README.mdandconfig.yaml.example;dist/stays out ofgit status.goreleaser build(non-snapshot, with all its git checks) accepted the tag and the clean tree.go version -mon the binary showedmod github.com/taskinen/mailboxzero v1.0.0-stamptestandvcs.modified=false. So release binaries will report their tag.v9.9.9test tag, because v2+ needs a/v2module path.ubuntu-26.04runner label, which its release doesn't know yet.The release workflow itself first runs when v1.0.0 is tagged.