I have some apps written in Go, which I deliver as binaries for each platform using GitHub releases. Until now, I was doing it with a very simple shell script.
But, I also wanted to dist these new releases in a homebrew tap. Adding that in the script would be kind of trivial, but I didn’t like the way I was using it all (arguments, hacks, etc).
I could, of course, change the formulas by hand, but I’m lazy and that seems just too much work for me.
So, time to my shell script to evolve!
I wanted a tool that:
- provides reproducible builds
- is fast
- is easy to wrap with the CI
- distributes itself
So, I created goreleaser!
GoReleaser can build and release go binaries in
tar.gz for several platforms,
and can create/update homebrew formulaes. All that by having a simple
goreleaser.yml in the repository root:
repo: goreleaser/releaser binary_name: release brew: repo: goreleaser/homebrew-formulae build: oses: - windows - darwin - linux
Then, I basically wire this in the
after_success: test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash
Which generates release like this on GitHub:
It is so easy that I’m already using it in all my suitable Go projects:
- GoReleaser itself!
- Antibody - A faster and simpler antigen written in Golang
- CloneOrg - Clone all repos of a github organization
- ForkCleaner - Cleans up old and inactive forks on your github account
- GithubVacations - Automagically ignore all notifications related to work when you are on vacations
- KarmaHub - Compares the amount of issues and pull requests you created with the amount of comments and code reviews you did
- OrgStats - Get the contributor stats summary from all repos of any given organization
- TorrentWatcher - Automagically download torrent files to ~/Downloads
The roadmap is pretty much what you find in the issues, but, IMO, the highlights are:
- bintray support
- create linux packages (with fpm or something)
- post/pre build hooks
I believe those features will enable GoReleaser to be even more useful!
I was very glad to see the results of GoReleaser!
- First page on /r/golang for 2 days (and top 1 most of that time)
- 300+ stars in just a few days
- GitHub trending on Go (still at the time of writing)
- Several comments on the reddit post
- This issue
Thank you all!