feat(cli): package acpctl for Homebrew via GoReleaser - #449
jeremyeder wants to merge 4 commits into
Conversation
Add an automated release pipeline for the acpctl CLI: - components/ambient-cli/.goreleaser.yaml: GoReleaser v2 config building darwin/linux amd64+arm64 binaries and generating a Homebrew formula. Uses builds[].dir for the monorepo subdir (OSS-compatible; not Pro monorepo mode). Keeps a formula (not macOS-only cask) so brew install works on Linux too. Tap owner is parameterized via HOMEBREW_TAP_OWNER (defaults to openshift-online). - .github/workflows/acpctl-release.yml: on `v*` tag push, runs `goreleaser release`, publishing a GitHub Release and pushing the formula to <owner>/homebrew-tap. - components/ambient-cli/RELEASING.md: release procedure + required secret/variable wiring and token guidance. - README: add `brew install openshift-online/tap/acpctl` instructions. ldflags target the Go module path (github.com/ambient-code/platform/...), matching go.mod and the Makefile, so `acpctl version` reports the real version.
Replace the stored HOMEBREW_TAP_GITHUB_TOKEN PAT with a short-lived token minted at runtime by actions/create-github-app-token, per repo CI/CD conventions (no long-lived PATs). Update RELEASING.md to document the App setup (HOMEBREW_TAP_APP_ID + HOMEBREW_TAP_APP_PRIVATE_KEY).
Same rendered value; avoids naive quoted-string secret scanners flagging a GoReleaser env-var template reference as a literal secret.
|
🤖 Amber Analysis — PR #449: feat(cli): package acpctl for Homebrew via GoReleaser Good overall structure — the App-token tap pattern is correct, no long-lived PATs, no Root Cause: The new workflow ( Blockers1. Action versions must be SHA-pinned (Security — Blocker) The existing production workflow ( - uses: actions/checkout@v4 # ❌ mutable
- uses: actions/setup-go@v5 # ❌ mutable
- uses: actions/create-github-app-token@v2 # ❌ mutableThis workflow has 2. - name: Install GoReleaser (OSS)
run: go install github.com/goreleaser/goreleaser/v2@v2.17.1This fetches and compiles an external binary during the release job. Even with a pinned version, the module proxy can serve different content than expected across runs, and the build step runs in a context that has
The PR body explicitly avoids Warnings (Non-blocking)W1. W2. Confidence[85%] Medium-High — the design is solid; the two blockers are mechanical (SHA pinning + binary provenance) with clear fixes. Happy to re-review once addressed. RollbackPurely additive changes (new files only). Rolling back: — Amber |
|
🤖 Amber Analysis — PR #449: feat(cli): package acpctl for Homebrew via GoReleaser Good overall structure — the App-token tap pattern is correct, no long-lived PATs, no Root Cause: The new workflow ( Blockers1. Action versions must be SHA-pinned (Security — Blocker) The existing production workflow ( - uses: actions/checkout@v4 # ❌ mutable
- uses: actions/setup-go@v5 # ❌ mutable
- uses: actions/create-github-app-token@v2 # ❌ mutableThis workflow has 2. - name: Install GoReleaser (OSS)
run: go install github.com/goreleaser/goreleaser/v2@v2.17.1This fetches and compiles an external binary during the release job. Even with a pinned version, the module proxy can serve different content than expected across runs, and the build step runs in a context that has
The PR body explicitly avoids Warnings (Non-blocking)W1. W2. Confidence[85%] Medium-High — the design is solid; the two blockers are mechanical (SHA pinning + binary provenance) with clear fixes. Happy to re-review once addressed. RollbackPurely additive changes (new files only). Rolling back: — Amber |
1 similar comment
|
🤖 Amber Analysis — PR #449: feat(cli): package acpctl for Homebrew via GoReleaser Good overall structure — the App-token tap pattern is correct, no long-lived PATs, no Root Cause: The new workflow ( Blockers1. Action versions must be SHA-pinned (Security — Blocker) The existing production workflow ( - uses: actions/checkout@v4 # ❌ mutable
- uses: actions/setup-go@v5 # ❌ mutable
- uses: actions/create-github-app-token@v2 # ❌ mutableThis workflow has 2. - name: Install GoReleaser (OSS)
run: go install github.com/goreleaser/goreleaser/v2@v2.17.1This fetches and compiles an external binary during the release job. Even with a pinned version, the module proxy can serve different content than expected across runs, and the build step runs in a context that has
The PR body explicitly avoids Warnings (Non-blocking)W1. W2. Confidence[85%] Medium-High — the design is solid; the two blockers are mechanical (SHA pinning + binary provenance) with clear fixes. Happy to re-review once addressed. RollbackPurely additive changes (new files only). Rolling back: — Amber |
What
Adds an automated Homebrew release pipeline for
acpctl. Pushing avX.Y.Ztag cross-compiles binaries, publishes a GitHub Release, and updates the
Homebrew formula in
openshift-online/homebrew-tap:Prebuilt binary — no Go toolchain needed at install time. macOS and Linux,
amd64 + arm64.
How it works
v*tag push →.github/workflows/acpctl-release.ymlruns the OSS GoReleaser,which builds from
components/ambient-cli, creates the Release, and pushes thegenerated formula to the tap.
Design choices (and why)
builds[].dir,not the Pro-only
monorepo:block.goreleaserbinary directlyrather than
goreleaser/goreleaser-action, minimizing supply-chain surface.brewsin favor of the macOS-onlyhomebrew_casks; we keep the formula sobrew installstill works on Linux.Revisit before GoReleaser v3.
vX.Y.Ztags. No other component uses git semver tags (containersrelease via image tags), so a
vX.Y.Ztag is by convention the acpctl release.actions/create-github-app-token, no long-lived PATs.github.com/ambient-code/platform/...,matching
go.mod/Makefile), not the repo URL. This is a linker-symbol path;changing it silently breaks
acpctl version.Required before the first upstream release
openshift-online/homebrew-tap;set repo secrets
HOMEBREW_TAP_APP_IDandHOMEBREW_TAP_APP_PRIVATE_KEY.HOMEBREW_TAP_OWNERunset (defaults toopenshift-online).See
components/ambient-cli/RELEASING.md.Validation
Cut a real
v0.1.0on my fork against a personal tap:jeremyeder/homebrew-tap.brew install jeremyeder/tap/acpctl→acpctl versionreportsClient: 0.1.0.Validated with a PAT on the fork; the upstream App-token form is documented but
not yet exercised end-to-end.
Files
components/ambient-cli/.goreleaser.yaml.github/workflows/acpctl-release.ymlcomponents/ambient-cli/RELEASING.mdcomponents/ambient-cli/README.md