Skip to content

ci: Publish a Homebrew cask on release - #83

Open
khvn26 wants to merge 1 commit into
mainfrom
feat/homebrew-cask
Open

ci: Publish a Homebrew cask on release#83
khvn26 wants to merge 1 commit into
mainfrom
feat/homebrew-cask

Conversation

@khvn26

@khvn26 khvn26 commented Aug 11, 2026

Copy link
Copy Markdown
Member

In this PR, we add support for brew install Flagsmith/tap/flagsmith.

Goreleaser is configured to open PRs against Flagsmith/homebrew-tap so Vanta's branch protection rule requirement is maintained. Flagsmith Engineering bot credentials are used.

Prerequisites:

  1. Flagsmith/homebrew-tap public repo. Created, accessible to Flagsmith Engineering app.
  2. FLAGSMITH_ENGINEERING_GH_APP_ID and ..._PRIVATE_KEY should be set org-level — confirmed.

`brew install Flagsmith/tap/flagsmith`, from our own tap rather than
homebrew-core: core needs 30 forks, 30 watchers or 75 stars, and does not
take submissions from a project's own authors.

A cask, not a formula, because we ship prebuilt binaries — and because
goreleaser removed the `brews` (formula) section in v2.16 in favour of
`homebrew_casks`. The workflow pins `~> v2`, so `brews` was never an option.

The tap enforces the same no-direct-push rule as everywhere else, so
`pull_request.enabled` puts the cask on a `flagsmith-cli-<version>` branch
and opens a PR. Without it goreleaser commits straight to the tap's default
branch; setting it also defaults the head branch, so no branch config here.

`GITHUB_TOKEN` cannot reach another repo, so the cask push borrows the
engineering GitHub App, scoped to `homebrew-tap` and to the two permissions
the PR needs. Same pattern as flagsmith/flagsmith's renovate and
update-flagsmith-environment workflows.

The postflight `xattr` strips the quarantine attribute Homebrew sets on what
it downloads: our macOS binaries are unsigned, so without it the first run
dies with "flagsmith is damaged and can't be opened". `install.sh` never hit
this because curl does not set the attribute. Notarisation is the real fix.

Verified with `goreleaser check` and a snapshot build. `flagsmith completion`
runs without config or auth, so install-time completion generation is safe.

beep boop
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow generates a scoped GitHub App token for the homebrew-tap repository and exposes it to GoReleaser. GoReleaser now publishes the flagsmith Homebrew cask with shell completions and a macOS quarantine-removal hook. The README adds Homebrew installation instructions before the existing shell installer.

Estimated code review effort: 2 (Simple) | ~10 minutes


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 20b96c2d-37b4-46ce-921e-b5eb83f37130

📥 Commits

Reviewing files that changed from the base of the PR and between 462e966 and 983f673.

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

Comment thread .goreleaser.yaml
Comment thread README.md

@emyller emyller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🍎

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