Skip to content

[build] goreleaser cross-platform binaries + release workflow (STAR-53)#24

Merged
vt128 merged 2 commits into
masterfrom
feat/goreleaser-distribution
Jun 22, 2026
Merged

[build] goreleaser cross-platform binaries + release workflow (STAR-53)#24
vt128 merged 2 commits into
masterfrom
feat/goreleaser-distribution

Conversation

@vt128

@vt128 vt128 commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

Add prebuilt-binary distribution so StarCLI installs without a Go toolchain — the v0.1.0 cost-price audit's top P1 and the biggest adoption barrier (today it's go install only, needing Go 1.25).

  • .goreleaser.yaml — builds linux / darwin / windows × amd64 / arm64 with CGO_ENABLED=0 (modernc/sqlite is pure Go, so the whole binary is static and cross-compiles), -trimpath + the same version ldflags the Makefile injects (package config), tar.gz archives (zip on Windows), checksums, GitHub release.
  • .github/workflows/release.yml — on a vX.Y.Z tag, run GoReleaser. The third-party goreleaser-action is pinned to a full commit SHA (v7.2.2, supply-chain policy).
  • .gitignore — track .goreleaser.yaml (the root /*.yaml rule was hiding it).

Safety / how releases happen

  • The workflow only fires on a tag push, never on a PR. Merging this PR does not release anything — it just makes the automation available for the next tag.
  • The tag itself is still cut by a human after maintainer confirmation; GoReleaser only turns an existing tag into archives + a Release.

Verified locally

  • goreleaser check passes.
  • goreleaser release --snapshot --clean builds all six platform archives + checksums; the native binary's --version banner is correctly populated from the injected ldflags.

Homebrew tap deferred (add a brews: block when wanted). Tracks STAR-53 P1 (distribution).

vt128 added 2 commits June 22, 2026 23:49
Add prebuilt-binary distribution so the CLI installs without a Go toolchain
(the v0.1.0 cost-price audit's top P1 / biggest adoption barrier — currently
`go install` only, needing Go 1.25).

- .goreleaser.yaml: builds linux/darwin/windows × amd64/arm64 with CGO disabled
  (modernc/sqlite is pure Go, so the whole binary is static and cross-compiles),
  -trimpath + the same version ldflags the Makefile injects (package config),
  tar.gz archives (zip on Windows), checksums, GitHub release.
- .github/workflows/release.yml: on a vX.Y.Z tag, run GoReleaser. The third-party
  goreleaser-action is pinned to a full commit SHA (supply-chain policy). The tag
  is still cut by a human after confirmation; the workflow only turns a tag into
  archives + a Release, and never fires on a PR.
- .gitignore: dist/.

Verified locally: `goreleaser check` passes; `release --snapshot --clean` builds
all six platform archives + checksums, and the native binary's --version banner
is populated from the injected ldflags. Homebrew tap deferred (add a brews: block
when wanted).
@vt128 vt128 merged commit 4233d4a into master Jun 22, 2026
6 checks passed
@vt128 vt128 deleted the feat/goreleaser-distribution branch June 22, 2026 16:11
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