Skip to content

Commit 85d4373

Browse files
committed
chore: migrate Homebrew packaging from Formula to cask
Align godo with hensu: GoReleaser homebrew_casks, install docs use --cask, and CI checks the release config.
1 parent f5f4859 commit 85d4373

7 files changed

Lines changed: 64 additions & 6 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,17 @@ jobs:
1616
run: go build -o godo ./cmd/godo
1717
- name: CI gate (godo.yaml)
1818
run: ./godo ci
19+
20+
# Catches a broken .goreleaser.yaml on every push, instead of at tag time
21+
# when a bad config means a failed release.
22+
release-config:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version-file: go.mod
29+
- uses: goreleaser/goreleaser-action@v6
30+
with:
31+
version: "~> v2"
32+
args: check

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ jobs:
2626
args: release --clean
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
# Optional: absent secret → tap/bucket push is skipped, not failed.
30+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

‎.goreleaser.yaml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,44 @@ archives:
4848
checksum:
4949
name_template: checksums.txt
5050

51+
# Packaging homes. Both pushes need a PAT with write access to those repos,
52+
# exposed to the release workflow as TAP_GITHUB_TOKEN; without it the release
53+
# still publishes, it just does not update the tap or the bucket.
54+
# Homebrew ships pre-built binaries as casks now; `brews` is deprecated and
55+
# makes `goreleaser check` fail. Casks are macOS-only — Linux installs go
56+
# through `go install` or the release binary (docs/install.md).
57+
homebrew_casks:
58+
- name: godo
59+
ids: [archive]
60+
repository:
61+
owner: MY-RV
62+
name: homebrew-tap
63+
branch: main
64+
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
65+
directory: Casks
66+
homepage: "https://github.com/MY-RV/godo"
67+
description: "Thin repo command catalog"
68+
skip_upload: '{{ if .Env.TAP_GITHUB_TOKEN }}false{{ else }}true{{ end }}'
69+
hooks:
70+
post:
71+
install: |
72+
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
73+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/godo"]
74+
end
75+
76+
scoops:
77+
- name: godo
78+
ids: [archive]
79+
repository:
80+
owner: MY-RV
81+
name: scoop-bucket
82+
branch: main
83+
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
84+
homepage: "https://github.com/MY-RV/godo"
85+
description: "Thin repo command catalog"
86+
license: "MIT"
87+
skip_upload: '{{ if .Env.TAP_GITHUB_TOKEN }}false{{ else }}true{{ end }}'
88+
5189
changelog:
5290
sort: asc
5391
filters:

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ godo -e version
1313
## Install
1414

1515
```bash
16-
brew install MY-RV/tap/godo
16+
brew install --cask MY-RV/tap/godo
1717
```
1818

1919
```bash

‎docs/distribution.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Package / binary name is always **`godo`**. Module import path stays `github.com
88
|---------|-----|
99
| GitHub Releases | Download bare binary or archive — [install.md](./install.md) |
1010
| Go | `go install github.com/my-rv/godo/cmd/godo@v0.2.0` |
11-
| Homebrew | `brew install MY-RV/tap/godo` ([tap](https://github.com/MY-RV/homebrew-tap)) |
11+
| Homebrew (macOS) | `brew install --cask MY-RV/tap/godo` ([tap](https://github.com/MY-RV/homebrew-tap)) |
1212
| Scoop | `scoop bucket add my-rv https://github.com/MY-RV/scoop-bucket` then `scoop install godo` |
1313
| Self-update | `godo -e update` / `godo --update-check` |
1414

@@ -18,10 +18,10 @@ Shared across godo, hensu, and future CLIs:
1818

1919
| Store | Home | Install |
2020
|-------|------|---------|
21-
| Homebrew | [MY-RV/homebrew-tap](https://github.com/MY-RV/homebrew-tap) | `brew install MY-RV/tap/godo` |
21+
| Homebrew | [MY-RV/homebrew-tap](https://github.com/MY-RV/homebrew-tap) | `brew install --cask MY-RV/tap/godo` (`Casks/godo.rb`) |
2222
| Scoop | [MY-RV/scoop-bucket](https://github.com/MY-RV/scoop-bucket) | `scoop bucket add my-rv https://github.com/MY-RV/scoop-bucket` then `scoop install godo` |
2323

24-
Fully-qualified Homebrew avoids clashing with unrelated taps that also expose a `godo` formula.
24+
Homebrew ships pre-built binaries as **casks** (macOS-only). The fully-qualified name avoids clashing with unrelated taps.
2525

2626
## Later / optional
2727

‎docs/install.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ go build -ldflags "-X github.com/my-rv/godo.Version=v0.2.0" -o godo ./cmd/godo
3737
## Package managers
3838

3939
```bash
40-
brew install MY-RV/tap/godo
40+
brew install --cask MY-RV/tap/godo
4141
```
4242

43+
Homebrew ships pre-built binaries as a **cask**, and casks are macOS-only. On Linux use Go or the release binary.
44+
45+
If you previously installed the Formula (`brew install MY-RV/tap/godo`), uninstall it first: `brew uninstall godo`, then install the cask.
46+
4347
```powershell
4448
scoop bucket add my-rv https://github.com/MY-RV/scoop-bucket
4549
scoop install godo

‎docs/roadmap.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This is what we **commit to communicate**. Pre-1.0 APIs can still change within
1818

1919
## Post-v0.1 — intended (not promised dates)
2020

21-
- Shared family packaging: `MY-RV/homebrew-tap` (`brew install MY-RV/tap/godo`), `MY-RV/scoop-bucket`
21+
- Shared family packaging: `MY-RV/homebrew-tap` (`brew install --cask MY-RV/tap/godo`), `MY-RV/scoop-bucket`
2222
- Optional: winget (`MY-RV.Godo`), later choco / AUR / Nix as demand appears
2323
- Engine command registry polish; more e2e
2424
- Dialects backlog only if explicitly promoted here

0 commit comments

Comments
 (0)