Fast and easy Go binaries delivery

Marechal Cândido Rondon · January 02, 2017

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!

goreleaser

I wanted a tool that:

So, I created goreleaser!

An image from Notion

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 .travis.yml:

after_success:
  test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash

Which generates release like this on GitHub:

An image from Notion

It is so easy that I'm already using it in all my suitable Go projects:

Roadmap

The roadmap is pretty much what you find in the issues, but, IMO, the highlights are:

I believe those features will enable GoReleaser to be even more useful!

Community Feedback

I was very glad to see the results of GoReleaser!

Thank you all!