minutes icon indicating copy to clipboard operation
minutes copied to clipboard

Automate the Homebrew cask bump in the release pipeline (cask lagged at 0.18.2 while releases reached 0.24.0)

Open erikcw opened this issue 3 months ago • 3 comments

The current release to 0.24.0. The Minutes homebrew cask is still at version 0.18.2. Perhaps updating homebrew can be added to the CI process.

brew update                                                                                                                                                                                             
brew upgrade --cask silverstein/tap/minutes
brew info --cask silverstein/tap/minutes   # check version again
==> Updating Homebrew...
Already up-to-date.
Warning: Calling string comparison format for `depends_on macos:` is deprecated! Use `depends_on macos: :big_sur` instead.
Please report this issue to the silverstein/homebrew-tap tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/silverstein/homebrew-tap/Casks/minutes.rb:11

Warning: Not upgrading minutes, the latest version is already installed
Warning: Calling string comparison format for `depends_on macos:` is deprecated! Use `depends_on macos: :big_sur` instead.
Please report this issue to the silverstein/homebrew-tap tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/silverstein/homebrew-tap/Casks/minutes.rb:11

==> minutes ✔ (Minutes): 0.18.2
Privacy-first conversation memory — record, transcribe, search meetings locally
https://useminutes.app/
Installed (on request)
/opt/homebrew/Caskroom/minutes/0.18.2 (48MB)
  Installed on 2026-08-11 at 12:00:56

erikcw avatar Aug 11 '26 19:08 erikcw

Thanks for the report, and for including the full brew output, which made this a one-look diagnosis.

You found a real process gap. The tap's CLI formula was current at 0.24.0, but the cask stopped getting bumped at 0.18.2, so desktop installs fell six releases behind while every one of those releases had a perfectly good DMG sitting on GitHub.

Fixed as of a few minutes ago. The cask now points at the 0.24.0 DMG (sha256 computed from the release asset itself), and the deprecated depends_on macos: string comparison you were warned about is corrected to the symbol form in the same commit. This should get you current:

brew update
brew upgrade --cask silverstein/tap/minutes
brew info --cask silverstein/tap/minutes

You should see 0.24.0 and no deprecation warning.

On your suggestion of adding this to CI: agreed, and I am keeping this issue open to track exactly that. The reason it is not a five-minute change is that the release workflow lives in silverstein/minutes but the cask lives in silverstein/homebrew-tap, so automating the bump needs a cross-repository token wired into the release pipeline, and that pipeline is deliberately change-controlled. Until that lands, the cask bump is now an explicit release-checklist step rather than a thing that relies on memory, which is how it fell behind in the first place.

silverstein avatar Aug 11 '26 19:08 silverstein

The automation is merged (#737). Update Homebrew Tap fires on release: published and points both tap files at the version in one commit, then verifies the published tap actually matches, hash included.

Keeping this issue open for one remaining step, because a merged workflow that cannot authenticate has not fixed anything yet. Until the secret exists the job warns and exits 0 rather than turning a good release red, so it is inert, not broken.

The secret, scoped as narrowly as the job needs:

  1. https://github.com/settings/personal-access-tokens/new
  2. Resource owner silverstein, repository access Only select repositories → silverstein/homebrew-tap
  3. Repository permissions → Contents: Read and write. Nothing else.
  4. gh secret set HOMEBREW_TAP_TOKEN --repo silverstein/minutes

Then run the workflow manually from the Actions tab with dry run left on. It will report what it would change and write nothing, which confirms the token works without waiting for a release.

Optional but worth it: the job runs in a homebrew-tap environment. Adding required reviewers to it in repository settings means the tap token can only be used with an explicit approval, rather than by anyone who can publish a release.

@erikcw thanks again. Your report found a gap that had been silently costing every desktop user upgrades for six releases, and it is fixed both for now and structurally.

silverstein avatar Aug 11 '26 20:08 silverstein

Done and verified against the real secret, not just merged.

A manual dispatch just ran the whole path in CI with the token in place:

token can write to silverstein/homebrew-tap (no commit was created)
formula already at 0.24.0
cask already at 0.24.0 with a matching hash
tap already current; nothing to do

That confirms all four things that matter: the token authenticates, it can write, the tap agrees with the release, and the cask's sha256 matches the DMG rather than merely carrying the right version string. The tap's HEAD is unchanged, so nothing was committed to prove it.

One late addition worth explaining, in #738. The first dispatch went green and proved nothing about writing, because reading a public tap needs no more than public access. A token scoped Contents: Read-only would have produced exactly that same green run and then failed at the next release. So the bump now begins by updating the branch ref to the commit it already points at, which creates nothing but is still refused without write access. A mis-scoped token now fails on demand instead of during a release.

That is the third instance today of the same shape: work that only executes at release time, staying broken in silence. The cask freezing here, the sherpa archive in #733, and this. All three now fail on a pull request or on demand instead.

Closing. From the next release, Update Homebrew Tap points both files at the version in one commit and then re-derives the expected hash from the published tap to confirm it. If it ever cannot, the daily triage sweep compares the release against both tap files and surfaces the drift within a day.

silverstein avatar Aug 11 '26 20:08 silverstein