Skip to content

ci: GoReleaser for cross-platform CLI releases + Homebrew#11

Merged
bilby91 merged 1 commit into
mainfrom
ci/goreleaser
Jul 6, 2026
Merged

ci: GoReleaser for cross-platform CLI releases + Homebrew#11
bilby91 merged 1 commit into
mainfrom
ci/goreleaser

Conversation

@bilby91

@bilby91 bilby91 commented Jul 6, 2026

Copy link
Copy Markdown
Member

What

Ships the medea CLI as prebuilt binaries and a Homebrew cask. Now that the 1Password SDK builds CGO-free (PR #10), GoReleaser cross-compiles darwin/linux × amd64/arm64 from a single runner.

  • .goreleaser.yaml — pure-Go (CGO_ENABLED=0) builds, tar.gz archives, checksums, changelog, GitHub release (prerelease: auto for -rc/-beta tags), and a Homebrew cask pushed to crunchloop/homebrew-tap (with a macOS quarantine-strip postflight for the unsigned binary).
  • cmd/medea — stamps main.version at build time → medea --version.
  • .github/workflows/release.yml — on v* tags, runs goreleaser release.

Usage once merged

git tag v0.1.0 && git push origin v0.1.0        # stable → release + latest + tap
git tag v0.1.0-rc.1 && git push origin v0.1.0-rc.1   # prerelease → no latest/tap

Then: brew install crunchloop/tap/medea.

Verification

goreleaser check ✅ and goreleaser release --snapshot ✅ — all four targets build, --version stamp confirmed (medea version 0.0.1-next), cask generated correctly (both OSes/arches + quarantine postflight).

Prerequisites before the first stable release

  • Create the crunchloop/homebrew-tap repo.
  • Add secret HOMEBREW_TAP_GITHUB_TOKEN — a PAT with contents:write on the tap (GITHUB_TOKEN is scoped to this repo and can't push to the tap). Prereleases skip the tap, so an -rc tag works without it.

Scope / follow-up

Container images stay in build.yml for now (untouched, still builds fine against the new SDK). Next PR folds multi-arch images into GoReleaser and flips the server image to pure-Go/distroless-static — landed alongside the deferred 1Password smoke test.

🤖 Generated with Claude Code

Ship the medea CLI as prebuilt binaries and a Homebrew cask. Now that the
1Password SDK builds CGO-free (service-account auth), GoReleaser cross-compiles
darwin/linux × amd64/arm64 from one runner.

- .goreleaser.yaml: pure-Go (CGO_ENABLED=0) builds, tar.gz archives, checksums,
  changelog, GitHub release (prerelease: auto for -rc/-beta tags), and a
  Homebrew cask pushed to crunchloop/homebrew-tap (with a macOS quarantine-strip
  postflight for the unsigned binary).
- cmd/medea: stamp main.version at build time -> `medea --version`.
- .github/workflows/release.yml: on `v*` tags, run `goreleaser release`.

Container images stay in build.yml for now; folding them into GoReleaser (and
flipping the server image to pure-Go) is the next PR. Verified locally with
`goreleaser check` and `goreleaser release --snapshot` (all four targets build;
version stamp + cask confirmed).

Prereqs before first stable release: create crunchloop/homebrew-tap and add a
HOMEBREW_TAP_GITHUB_TOKEN secret (PAT with contents:write on the tap).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bilby91 bilby91 merged commit af696f2 into main Jul 6, 2026
2 checks passed
@bilby91 bilby91 deleted the ci/goreleaser branch July 6, 2026 19:49
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