Skip to content

ci(release): publish homebrew cask#13

Merged
flc1125 merged 1 commit into
mainfrom
release/homebrew-tap
May 19, 2026
Merged

ci(release): publish homebrew cask#13
flc1125 merged 1 commit into
mainfrom
release/homebrew-tap

Conversation

@flc1125
Copy link
Copy Markdown
Member

@flc1125 flc1125 commented May 19, 2026

Summary

Add Homebrew cask publishing to the existing GoReleaser release flow so new CLI releases can update the go-tapd/homebrew-tap repository automatically.

Changes

  • Configure GoReleaser to publish a tapd cask into go-tapd/homebrew-tap
  • Pass and validate TAP_GITHUB_TOKEN in the release workflow before publishing
  • Document Homebrew installation in the README

Motivation

  • Users should be able to install tapd through Homebrew after each release
  • The release workflow should fail early if the tap publishing token is missing

Testing

  • make release-check
  • go test ./...
  • make release-snapshot

Summary by CodeRabbit

  • New Features

    • Added support for installing via Homebrew Cask.
  • Documentation

    • Updated installation instructions to include Homebrew Cask as an available installation option.

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 15:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e33c608f-fcf3-4f71-adb4-7a03db0df292

📥 Commits

Reviewing files that changed from the base of the PR and between 2f682d6 and 4a0e31a.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • .goreleaser.yaml
  • README.md

📝 Walkthrough

Walkthrough

This PR adds Homebrew cask distribution for the tapd CLI by configuring GoReleaser to build and publish casks, validating the required GitHub token in the release workflow, and documenting the new installation method to users.

Changes

Homebrew Cask Release Integration

Layer / File(s) Summary
Homebrew cask release configuration
.goreleaser.yaml
Archive configuration now includes explicit tapd build ID mapping. New homebrew_casks block defines the cask name, tap repository details, GitHub token authentication, target directory, and commit templating for automated cask publication.
Release workflow token validation and passing
.github/workflows/release.yml
New step validates that TAP_GITHUB_TOKEN is present before GoReleaser execution, exiting early if missing. GoReleaser step environment is extended to pass TAP_GITHUB_TOKEN alongside GITHUB_TOKEN for downstream release actions.
Installation documentation update
README.md
Install section now includes explicit Homebrew cask installation command positioned before existing Go installation instructions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A homebrew tap now flows with care,
From CLI to cellar, released with flair!
Token checked, cask built, and docs shine bright—
tapd finds its way, installed just right! 🍺✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci(release): publish homebrew cask' directly and concisely summarizes the main change: adding Homebrew cask publishing to the release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/homebrew-tap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Homebrew cask publishing to the GoReleaser release flow, wires a required TAP_GITHUB_TOKEN secret through the release workflow, and documents Homebrew installation in the README.

Changes:

  • Configure GoReleaser with a homebrew_casks block targeting go-tapd/homebrew-tap and assign an explicit id to the archive.
  • Validate TAP_GITHUB_TOKEN early in the release workflow and pass it to GoReleaser.
  • Document brew install --cask usage in the README.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
README.md Adds Homebrew install instructions ahead of the existing go install snippet.
.goreleaser.yaml Names the archive tapd and adds a homebrew_casks entry publishing to go-tapd/homebrew-tap.
.github/workflows/release.yml Adds a preflight check for TAP_GITHUB_TOKEN and exposes it to the GoReleaser step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@flc1125 flc1125 merged commit 7b263a4 into main May 19, 2026
6 of 7 checks passed
@flc1125 flc1125 deleted the release/homebrew-tap branch May 19, 2026 15:16
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 adds Homebrew Cask support to the GoReleaser configuration and updates the README with installation instructions. Feedback suggests switching from a Homebrew Cask to a Formula, which is the standard for CLI tools and provides better cross-platform support and dependency management. Correspondingly, the README installation command should be updated to remove the --cask flag.

Comment thread .goreleaser.yaml
Comment on lines +42 to +59
homebrew_casks:
- name: tapd
ids:
- tapd
binaries:
- tapd
repository:
owner: go-tapd
name: homebrew-tap
branch: main
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
directory: Casks
homepage: "https://github.com/go-tapd/cli"
description: "TAPD command line client"
commit_msg_template: "chore: update tapd to {{ .Tag }}"
commit_author:
name: go-tapd-bot
email: actions@github.com
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

For a command-line interface (CLI) tool like tapd, it is recommended to use a Homebrew Formula instead of a Cask.

Homebrew Casks are primarily intended for macOS native applications (typically GUI apps) or binaries distributed as .dmg/.pkg. Using a Formula (brews in GoReleaser) is the standard for CLI tools and provides several benefits:

  1. Cross-platform support: Formulae work on both macOS and Linux (Linuxbrew), whereas Casks are macOS-only.
  2. Standard pathing: Formulae are symlinked into the standard Homebrew prefix, which is more idiomatic for CLI utilities.
  3. Dependency management: Formulae can declare dependencies on other packages if needed in the future.
brews:
  - name: tapd
    ids:
      - tapd
    repository:
      owner: go-tapd
      name: homebrew-tap
      branch: main
      token: "{{ .Env.TAP_GITHUB_TOKEN }}"
    directory: Formula
    homepage: "https://github.com/go-tapd/cli"
    description: "TAPD command line client"
    commit_msg_template: "chore: update tapd to {{ .Tag }}"
    commit_author:
      name: go-tapd-bot
      email: actions@github.com

Comment thread README.md
Install with Homebrew:

```bash
brew install --cask go-tapd/tap/tapd
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If switching to a Homebrew Formula (as suggested in .goreleaser.yaml), the --cask flag should be removed from the installation command.

Suggested change
brew install --cask go-tapd/tap/tapd
brew install go-tapd/tap/tapd

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.

2 participants