Sample repo to automatically bump a Homebrew cask
whenever a new tag is pushed on the main app repo using a GitHub actions template
- Create a custom GitHub access token (classic) with the
public_repo
scope - Add this token to your repo's ⚙
Settings
→ ⧆Secrets and variables
→Actions
→Actions secrets and variables
→New repository secret
under the name ofTOKEN
(the repo is the one that will run this workflow, e.g., the one that has the main app that needs a cask 'github.com/YOUR_NAME/YOUR_APP_REPO/settings/secrets/actions') - Add this bump_homebrew_cask.yml workflow from this repo to yours
- Change it to reference your Homebrew cask tap
tap : your_name/tap_name # [opt] |homebrew/core|
cask : cask_name # [req] Cask name
- Release your app as usual by pushing a
tag
- Wait for the workflow to finish and merge the hopefully correct Pull Request on your Homebrew cask tap repo
(not to be confused with the main app repo)
- Under ⚙
Settings
→Pull Requests
, select ✓Allow auto-merge
(doc) - Under ⚙
Settings
→ Branches
→Branch protection rules
, set (doc):Branch name pattern
to the name of your branch (e.g.,main
)- ✓
Require a pull request before merging
- ✓
Dismiss stale pull request approvals when new commits are pushed
- ✓
- ✓
Require status checks to pass before merging
- Select at least one status check, e.g.,
test-bot (ubuntu-22.04)
- Select at least one status check, e.g.,
- Create another custom GitHub access token (classic) with the
public_repo
scope - Add this token to your repo's ⚙
Settings
→ ⧆Secrets and variables
→Actions
→Actions secrets and variables
→New repository secret
under the name ofGH_TOKEN
- Add automerge workflow to your repo, for example
To be discovered...