Skip to content

feat: automated releases (GoReleaser + GitHub Actions) and -version flag#21

Merged
fedir merged 1 commit into
masterfrom
ci/auto-release
Jun 6, 2026
Merged

feat: automated releases (GoReleaser + GitHub Actions) and -version flag#21
fedir merged 1 commit into
masterfrom
ci/auto-release

Conversation

@fedir
Copy link
Copy Markdown
Owner

@fedir fedir commented Jun 6, 2026

Summary

Replicates the auto-release setup from the sibling json_encode project so tagged releases of yrank are built and published automatically.

What's added

  • .github/workflows/release.yml — on a v* tag push, runs GoReleaser: cross-compiles binaries (linux/darwin/windows × amd64/arm64), publishes a GitHub release with checksums + changelog, and updates the Homebrew tap.
  • .github/workflows/ci.yml — on push/PR to master: make vet, make build, make test, plus an offline -local-test smoke run (no API quota).
  • .goreleaser.yaml — build/archive/checksum/changelog config + a brews: block publishing a formula to fedir/homebrew-tap.
  • -version / -V flag — prints the version and exits. main.go declares var version = "dev", overridden at build time via -ldflags "-X main.version=...".
  • Makefile — version injection on build/install, plus release and snapshot targets; clean now also removes dist/.
  • Docs — README install-via-Homebrew + a Releases section; refreshed the stale Travis badge to a GitHub Actions CI badge; CLAUDE.md CI/release notes.

How to cut a release

git tag v1.2.3
git push origin v1.2.3

Required secret

The Homebrew formula update needs a HOMEBREW_TAP_TOKEN repository secret with write access to fedir/homebrew-tap (same as json_encode). GITHUB_TOKEN is provided automatically.

Verification

  • make build injects the version (confirmed: ./yrank -versionyrank <git-describe>).
  • make vet + make test pass with -race.
  • GoReleaser config mirrors the working json_encode one; it is validated by the release workflow on the first tag push (goreleaser not installed locally).

🤖 Generated with Claude Code

@fedir fedir merged commit 8b5a632 into master Jun 6, 2026
1 check passed
@fedir fedir deleted the ci/auto-release branch June 6, 2026 08:15
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