-
Notifications
You must be signed in to change notification settings - Fork 105
Add Goreleaser support for releases and homebrew #35
Conversation
Codecov Report
@@ Coverage Diff @@
## main #35 +/- ##
=======================================
Coverage 84.26% 84.26%
=======================================
Files 16 16
Lines 521 521
=======================================
Hits 439 439
Misses 73 73
Partials 9 9 Continue to review full report at Codecov.
|
@rothgar |
- name: kubecolor | ||
tap: | ||
owner: dty1er | ||
name: homebrew-tap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GO_RELEASER }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/release.yml
Outdated
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.x | ||
- name: Docker login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to do Docker login?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh woops, that was from another project. You don't. It's only if you want to create container images and push them to a registry. I'll remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@rothgar |
After running below, the GH action started: https://github.com/dty1er/kubecolor/runs/1410458503
|
It successfully finished: https://github.com/dty1er/kubecolor/runs/1410458503 |
v0.0.7 release is made!
Also, I downloaded the build binary for Darwin and made sure it works. |
And homebrew-tap: https://github.com/dty1er/homebrew-tap/blob/master/Formula/kubecolor.rb The formula is made. |
I tried
Made sure |
Thank you for your effort! |
WHAT
This adds a config for goreleaser to manually create releases via
goreleaser release
and also automatically via github actions when a new tag is pushed. I have an example in my fork and tap repo.brew install rothgar/tap/kubecolor
works.You'll need to create a github repo called
dty1er/homebrew-tap/
and you'll need to create a GITHUB_TOKEN with access to push into that repo. You can read more about it here https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflowYou can create the token at https://github.com/settings/tokens It should only need repo access. If you want to use goreleaser to publish .rpm and .deb packages or docker containers you can also add package access.
You should make sure the token is set up in the repo settings as GITHUB_TOKEN so goreleaser can use it automatically.
Let me know if you run into problems or have questions. 馃憤
WHY
So releases are automatic and
brew install
worksRelated issue
Fixes #27