Skip to content

ci: migrate release pipeline to GoReleaser#7

Merged
fank merged 3 commits intomainfrom
claude/goreleaser-migration
Apr 12, 2026
Merged

ci: migrate release pipeline to GoReleaser#7
fank merged 3 commits intomainfrom
claude/goreleaser-migration

Conversation

@fank
Copy link
Copy Markdown
Member

@fank fank commented Apr 12, 2026

Summary

Replaces the hand-rolled bash release pipeline with GoReleaser v2. This is the pilot migration — once validated on a real release, the same pattern fans out to atl-cli and n8n-cli.

What changes

Before After
~140 lines of bash (build loop, archive, checksum, changelog) .goreleaser.yml declarative config (~65 lines)
softprops/action-gh-release for release creation GoReleaser handles it
dawidd6/action-homebrew-bump-formula for tap update GoReleaser brews: pushes formula directly to tap
Release body with hardcoded curl commands per platform GoReleaser header with Homebrew-first install
Total: ~170 lines in release.yml Total: ~115 lines across both files (−32%)

Why GoReleaser

The previous approach (Option B — dawidd6/action-homebrew-bump-formula) failed due to two fundamental issues discovered during the v1.1.1 pilot release:

  1. bump-formula-pr breaks formula when multiple URLs are used Homebrew/brew#8967: brew bump-formula-pr --version= only downloads and updates the SHA for the runner's own platform (linux-amd64). The other 3 platform URLs (darwin-arm64, darwin-amd64, linux-arm64) were left with stale SHAs — broken installs on 3 of 4 platforms.
  2. Branch naming rules: brew bump-formula-pr creates bump-* branches which are rejected by the org-level branch naming ruleset.

GoReleaser avoids both: it generates the entire formula from scratch and pushes directly to the tap's main branch (no bump branch, no PR).

Auth

Same GitHub App (enthus-appdev-tap-bumper) and org secrets from before:

  • HOMEBREW_TAP_APP_ID / HOMEBREW_TAP_APP_PRIVATE_KEY
  • Token is minted per-run via actions/create-github-app-token@v2 and passed to GoReleaser as HOMEBREW_TAP_TOKEN

Known deprecation

GoReleaser v2 flags brews as deprecated in favor of homebrew_casks (proper Homebrew Casks). However, Homebrew Casks are macOS-only — no Linux Homebrew support. Since our CLIs ship for both platforms, we keep brews for now. This is explicitly called out in the config and will be revisited when the ecosystem evolves.

Test plan

  • .goreleaser.yml passes goreleaser check
  • release.yml is valid YAML
  • Merge this PR
  • Tag and push v1.2.0 (or next version)
  • Verify: GoReleaser creates the GitHub Release with multi-platform binaries + checksums
  • Verify: GoReleaser pushes an updated Formula/esq.rb to enthus-appdev/homebrew-tap with correct version + SHA256s for all 4 platforms
  • Verify: brew install enthus-appdev/tap/esq installs the new version

Rollout

After validation, same .goreleaser.yml + simplified release.yml pattern gets applied to:

  • enthus-appdev/atl-cli (formula name: atl, entry: ./cmd/atl, ldflags: main.version, main.commit, main.date)
  • enthus-appdev/n8n-cli (formula name: n8nctl, entry: ./cmd/n8nctl, ldflags: github.com/enthus-appdev/n8n-cli/internal/cmd.version)

Replace the hand-rolled ~140-line bash release pipeline with GoReleaser
v2, reducing the workflow to ~35 lines of YAML plus a ~65-line
declarative .goreleaser.yml config.

What GoReleaser now handles in a single command:
- Cross-platform builds (linux/darwin/windows × amd64/arm64)
- tar.gz / zip archiving
- SHA256 checksums
- Changelog generation from git log
- GitHub Release creation with install instructions
- Homebrew tap formula push to enthus-appdev/homebrew-tap

This replaces the previous dawidd6/action-homebrew-bump-formula
approach which failed due to two fundamental issues:
1. brew bump-formula-pr only updates the current platform's URL/SHA
   in multi-URL formulas (Homebrew/brew#8967 — not supported)
2. The generated bump-* branch name violated org-level branch naming
   rules

GoReleaser avoids both: it generates the entire formula from scratch
and pushes directly to the tap's main branch.

Note: GoReleaser v2 deprecates `brews` in favor of `homebrew_casks`.
Casks are the correct Homebrew format for precompiled binaries, but
currently macOS-only — no Linux Homebrew support. Keeping `brews` for
now to maintain cross-platform coverage. Revisit when the ecosystem
evolves.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a .goreleaser.yml configuration file to automate the build and release process for the esq CLI tool across multiple platforms, including Homebrew support. A review comment suggests updating the deprecated brews key to homebrews to align with GoReleaser v2 standards.

fank added 2 commits April 12, 2026 12:05
GoReleaser v2 renamed brews → homebrews (the direct successor for CLI
formula generation, supporting both macOS and Linux). The homebrew_casks
key is a separate thing for macOS-only Casks — not what we need.
The previous commit changed brews → homebrews based on a review
suggestion, but homebrews is not a valid GoReleaser v2 key (config
validation fails). homebrew_casks exists but has a different config
structure (no test/install blocks — it generates actual macOS Casks,
not formulas).

brews is the only key that works today. The deprecation warning is
acknowledged — when GoReleaser provides a formula-compatible successor,
we migrate then.
@fank fank merged commit 4654bc8 into main Apr 12, 2026
6 checks passed
@fank fank deleted the claude/goreleaser-migration branch April 12, 2026 10:17
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