This guide explains how to set up automatic publishing to Homebrew when you create a release.
When you create a GitHub release with a version tag (e.g., v1.0.0), a GitHub Actions workflow automatically:
- Downloads the release tarball
- Calculates the SHA256 hash
- Updates the Homebrew formula
- Commits to the
homebrew-toolsrepository - Users can then install with
brew install warp
Create a new GitHub repository named homebrew-tools:
github.com/zero8dotdev/homebrew-toolsIn homebrew-tools, create this structure:
homebrew-tools/
├── Formula/
│ └── warp.rb # Homebrew formula (see warp.rb in main repo)
├── README.md
└── .github/
└── workflows/
└── publish.yml # This is already in warp-cli repo
In warp-cli repository:
warp.rb- Homebrew formula template.github/workflows/publish-homebrew.yml- Auto-publish workflow
In homebrew-tools repository:
- Copy the files to their respective locations
- Create
README.mdwith installation instructions
- Go to GitHub Settings → Developer settings → Personal access tokens
- Create new token with these scopes:
repo(full control of private repositories)workflow(update GitHub Action workflows)
- Copy the token
In warp-cli repository settings:
- Go to Settings → Secrets and variables → Actions
- Create new secret:
HOMEBREW_TAP_TOKEN - Paste your personal access token
To test the auto-publishing:
git tag v0.1.0
git push origin v0.1.0Then on GitHub:
- Go to Releases
- Create release from tag
v0.1.0 - Write release notes
- Publish release
GitHub Actions will automatically:
- Calculate SHA256
- Update
homebrew-tools/Formula/warp.rb - Commit and push to
homebrew-tools - Comment on the release with installation instructions
After the workflow completes, users can install with:
brew tap zero8dotdev/tools
brew install warpOr update with:
brew upgrade warp1. You create release with tag v0.1.0
↓
2. GitHub Actions triggers (on: release published)
↓
3. Downloads source tarball from GitHub
↓
4. Calculates SHA256 of tarball
↓
5. Updates Formula/warp.rb with new version & SHA256
↓
6. Commits to homebrew-tools repo
↓
7. Users can install: brew tap zero8dotdev/warp && brew install warp
# Update version in Cargo.toml
# v0.1.0 → v0.2.0
# Create tag
git tag v0.2.0
git push origin v0.2.0
# Go to GitHub and create release from tagThe workflow will automatically handle:
- SHA256 calculation
- Formula update
- Homebrew tap update
Check .github/workflows/publish-homebrew.yml logs:
- Is token valid?
- Does homebrew-tools repo exist?
- Is token permissions correct?
If automated workflow fails, manually update homebrew-tools:
# In homebrew-tools repository
git checkout Formula/warp.rb
# Update url to new version
# Update sha256 with output of: shasum -a 256 warp-v0.2.0.tar.gz
git add Formula/warp.rb
git commit -m "chore: bump warp to v0.2.0"
git pushOnce the project is more mature, you can submit to official Homebrew:
# Fork homebrew-core
# Create new formula: warp.rb
# Submit pull request
# Users can then install with:
brew install warp # No tap needed!- warp.rb - Homebrew formula template (in warp-cli repo)
- .github/workflows/publish-homebrew.yml - GitHub Actions workflow (in warp-cli repo)
- HOMEBREW_SETUP.md - This guide (in warp-cli repo)
brew tap zero8dotdev/tools
brew install warpbrew upgrade warpgit tag v1.0.0
git push origin v1.0.0
# Then create release on GitHub UI- ✅ Files are ready in this repository
- Create
homebrew-toolsrepository on GitHub - Copy files to
homebrew-tools - Set up
HOMEBREW_TAP_TOKENsecret - Create first release
- Test installation with
brew tap zero8dotdev/warp && brew install warp
That's it! You now have automated Homebrew publishing! 🎉