ci(release): publish homebrew cask#13
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds Homebrew cask distribution for the ChangesHomebrew Cask Release Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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_casksblock targetinggo-tapd/homebrew-tapand assign an explicitidto the archive. - Validate
TAP_GITHUB_TOKENearly in the release workflow and pass it to GoReleaser. - Document
brew install --caskusage 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.
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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:
- Cross-platform support: Formulae work on both macOS and Linux (Linuxbrew), whereas Casks are macOS-only.
- Standard pathing: Formulae are symlinked into the standard Homebrew prefix, which is more idiomatic for CLI utilities.
- 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| Install with Homebrew: | ||
|
|
||
| ```bash | ||
| brew install --cask go-tapd/tap/tapd |
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
Motivation
Testing
Summary by CodeRabbit
New Features
Documentation