Binary distribution: go install, release binaries, Homebrew cask, CI - #4
Merged
Conversation
- 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>
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.
Sets up installable distribution and automated releases.
Install paths
brew install citizen-123/tap/cli-capture(cask pushed tocitizen-123/homebrew-tapon release)go install github.com/citizen-123/cli-capture/cmd/cli-capture@latestchecksums.txtAutomation
.github/workflows/release.yml— onv*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 -raceon push/PR..goreleaser.yaml(v2) — trimpath +-s -w, ldflags stampmain.version/commit/date, tar.gz archives (zip on Windows), checksums, macOS quarantine postflight on the cask.Code
cmd/cli-capture:version/commit/datevars (ldflags targets) + a-versionflag.Verified locally with
goreleaser checkand a full--snapshotbuild (all 6 targets + cask render cleanly).🤖 Generated with Claude Code