惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
雷峰网
雷峰网
罗磊的独立博客
Y
Y Combinator Blog
博客园_首页
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
The Register - Security
The Register - Security
Simon Willison's Weblog
Simon Willison's Weblog
Latest news
Latest news
T
The Exploit Database - CXSecurity.com
AI
AI
The Cloudflare Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Help Net Security
I
Intezer
C
CXSECURITY Database RSS Feed - CXSecurity.com
W
WeLiveSecurity
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
H
Hacker News: Front Page
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
C
Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
Webroot Blog
Webroot Blog
Cyberwarzone
Cyberwarzone
Cloudbric
Cloudbric
G
GRAHAM CLULEY
Microsoft Security Blog
Microsoft Security Blog
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
G
Google Developers Blog

Homebrew

6.0.0 5.1.0 5.0.0 4.6.0 4.5.0 Homebrew’s new git signing key Homebrew and Workbrew 4.4.0 2023 Security Audit Homebrew’s Summer 2024 Hackathon 4.3.0 4.2.0 4.1.0 4.0.0 Maintainer Projects 3.6.0 3.5.0 Security Audit 3.4.0 3.3.0 3.2.0 Security Incident Disclosure 3.1.0 3.0.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 Homebrew Maintainer Meeting 2.1.0 2.0.0 1.9.0 1.8.0 Security Incident Disclosure 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0
Homebrew tap with bottles uploaded to GitHub Releases
dawidd6 · 2020-11-18 · via Homebrew

Since the Homebrew 2.5.2 release, you can upload bottles (binary packages) to GitHub Releases, in addition to the previous standard - Bintray. Support was added to Homebrew/brew in this PR on 2020-09-15, and a companion PR to Homebrew/homebrew-test-bot added support for setting the base download URL of bottles to point to a specific release on GitHub.

Creating the tap

First, go to GitHub and create an empty repository named with the homebrew- prefix, for example: USER/homebrew-tap.

github-repository

Then locally run:

brew tap-new USER/REPOSITORY

changing USER/REPOSITORY to the full name of the repository that you just created on GitHub. You can omit the homebrew- prefix and specify the --branch flag if your default branch should be named differently than main.

brew-tap-new

Navigate to the newly created tap on disk by executing:

cd $(brew --repository USER/REPOSITORY)

cd-brew-repository

Now you can list all files in this tap to see what is created by default.

Add the repository that you created on GitHub as the origin remote and push newly created files:

git remote add origin https://github.com/USER/REPOSITORY
git push --set-upstream origin main

git-push

I won’t go into too many details on how the workflows look, as they are subject to change at any time. For now, there are 2 workflow files created by default.

  • One is run on each pull_request event, so every push to a PR’s branch triggers the workflow, which tests changes made to formulae, builds bottles for those formulae and uploads them to GitHub Actions as artifacts.
  • The second workflow, run when a pull request is labelled, is responsible for bottle uploading and publishing.

Creating the first formula in the tap

It’s time we add a new formula to our tap; shall we?

All formulae should go in the Formula directory. Let’s suppose we want to create a formula for this little Go program named gothanks. Run locally:

brew create --tap=USER/REPOSITORY --go https://github.com/psampaz/gothanks/archive/v0.3.0.tar.gz

brew-create

brew-edit

This command will create a new standard formula for Go projects in your tap and open the file in your editor of choice. After you close the editor, you can still edit the formula with:

brew edit USER/REPOSITORY/FORMULA

Our gothanks formula, after some editing could look like this:

class Gothanks < Formula
  desc "Automatically star your go.mod Github dependencies"
  homepage "https://github.com/psampaz/gothanks"
  url "https://github.com/psampaz/gothanks/archive/v0.3.0.tar.gz"
  sha256 "ce5440334b3eac2e058724faa4c6e4478ca1d81ea087e55ccca33f1996752aad"
  license "MIT"

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args
  end

  test do
    ENV.delete "GITHUB_TOKEN"
    assert_match "no Github token found", shell_output(bin/"gothanks", 255)
  end
end

Now we can create a new branch, add the formula, commit it and push:

git checkout -b gothanks
git add Formula/gothanks.rb
git commit --message "gothanks 0.3.0 (new formula)"
git push --set-upstream origin gothanks

git-branch

But to trigger the workflows, we need to create a pull request from our recently-pushed branch. I’m using the hub utility for this operation, but you can use the newer GitHub CLI tool gh or just click your way through in GitHub’s UI.

github-pr

Uploading built bottles

Wait until the pull request’s checks become green. Then label your pull request with the pr-pull label (this is the default label that will trigger the uploading workflow; you can easily change this in workflow file). A new brew pr-pull workflow will be fired up and after a couple of minutes you should observe the PR closed, bottles uploaded and commits pushed to the main branch of your repository.

github-pr-closed github-release github-commits

Summary

With current tooling it’s now easier than ever to create your own Homebrew tap with bottles. Gone are the days when you had to create a Bintray account and fiddle around with custom CI configs. Now you can run a bunch of commands and get a tap up and running in minutes, with only a GitHub account!

Latest Posts

  • 6.0.0 11 Jun 2026

    Today, I’m proud to announce Homebrew 6.0.0. The most significant changes since 5.1.0 are a new tap trust security mechanism, the new faster, smaller, default internal...

  • 5.1.0 10 Mar 2026

    Homebrew 5.1.0 has been released. Homebrew’s most significant changes since 5.0.0 are expanded brew bundle support, brew version-install, new -full formula handling an...

  • 5.0.0 12 Nov 2025

    Today, I’d like to announce Homebrew 5.0.0. The most significant changes since 4.6.0 are download concurrency by default, official support for Linux ARM64/AArch64, tim...

  • 4.6.0 05 Aug 2025

    Today, I’d like to announce Homebrew 4.6.0. The most significant changes since 4.5.0 are opt-in concurrent downloads with HOMEBREW_DOWNLOAD_CONCURRENCY, preliminary ma...

  • 4.5.0 29 Apr 2025

    Today, I’d like to announce Homebrew 4.5.0. The most significant changes since 4.4.0 are major improvements to brew bundle/services, preliminary Linux support for cask...