For personal reference:
This is a followup on a previous post that is a bit more manual. This is a little bit easier.
a) Create your own Homebrew tap
Create a new GitHub public repository with a prefix
homebrew-tap. This will host all the apps that you want to distribute via your tap. Users will install your apps using the following commands:
b) Let’s use Github Actions to setup goreleaser
First, add a
.goreleaser.yml config file to your Go repo. Here’s an example:
The section of note here is the
brews: part. You can check goreleaser’s Quickstart guide for more information.
Here’s an example of a GitHub Action config on how to setup goreleaser to do the release for our tags.
name: Run goreleaser section. You need to add a personal access token with
repo, workflow, write:packages permissions to your repository’s secrets. In this example, the name used is
GH_PAT but you can use other names as well.
c) Do a tagged release
Tagged releases should now do a deployment to your tap.---
If you have any questions or feedback, please reach out @flowerinthenyt.
This work is licensed under a Creative Commons Attribution 4.0 International License.