Skip to content

Binary distribution: go install, release binaries, Homebrew cask, CI - #4

Merged
citizen-123 merged 2 commits into
mainfrom
binary-distribution
Jul 28, 2026
Merged

Binary distribution: go install, release binaries, Homebrew cask, CI#4
citizen-123 merged 2 commits into
mainfrom
binary-distribution

Conversation

@citizen-123

Copy link
Copy Markdown
Owner

Sets up installable distribution and automated releases.

Install paths

  • Homebrew: brew install citizen-123/tap/cli-capture (cask pushed to citizen-123/homebrew-tap on release)
  • go install: go install github.com/citizen-123/cli-capture/cmd/cli-capture@latest
  • Prebuilt binaries: attached to each GitHub Release with checksums.txt
  • From source: unchanged

Automation

  • .github/workflows/release.yml — on v* tags, GoReleaser cross-builds linux/darwin/windows × amd64/arm64, publishes the GitHub Release (with a grouped auto-changelog: Features / Bug fixes / Others) and pushes the Homebrew cask.
  • .github/workflows/ci.yml — build, vet, test -race on push/PR.
  • .goreleaser.yaml (v2) — trimpath + -s -w, ldflags stamp main.version/commit/date, tar.gz archives (zip on Windows), checksums, macOS quarantine postflight on the cask.

Code

  • cmd/cli-capture: version/commit/date vars (ldflags targets) + a -version flag.

Verified locally with goreleaser check and a full --snapshot build (all 6 targets + cask render cleanly).

Note: the Homebrew push step needs the HOMEBREW_TAP_GITHUB_TOKEN repo secret (set separately). The rest of the release works without it.

🤖 Generated with Claude Code

citizen-123 and others added 2 commits July 27, 2026 19:40
- cmd/cli-capture: add version/commit/date vars (ldflags targets) and a
  -version flag that prints them and exits.
- .goreleaser.yaml (v2): cross-compile linux/darwin/windows on amd64/arm64,
  trimpath + -s -w, ldflags stamp main.version/commit/date, tar.gz archives
  (zip on Windows) with README+LICENSE, checksums, GitHub-sourced changelog.
- .github/workflows/release.yml: on v* tags, run goreleaser-action@v6.
- .github/workflows/ci.yml: build, vet, and test -race on push/PR.
- README: install section now leads with `go install`, then prebuilt release
  binaries (with checksum verification), then from-source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- .goreleaser.yaml: add a homebrew_casks entry that pushes a cask to
  citizen-123/homebrew-tap on each release (GoReleaser deprecated formula
  `brews` in favour of casks). Cask carries a macOS postflight that strips the
  quarantine xattr from the unsigned binary. Changelog now groups commits into
  Features / Bug fixes / Others.
- release.yml: pass HOMEBREW_TAP_GITHUB_TOKEN so GoReleaser can write to the
  separate tap repo (the default GITHUB_TOKEN can't cross repositories).
- README: add a Homebrew install section (brew install citizen-123/tap/cli-capture).
- gitignore GoReleaser's /dist/ output.

Verified with `goreleaser check` and a `--snapshot` build (all 6 targets +
cask render cleanly).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@citizen-123
citizen-123 merged commit d0b0ec4 into main Jul 28, 2026
1 check passed
@citizen-123
citizen-123 deleted the binary-distribution branch July 28, 2026 00:54
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.

1 participant