TIL: GitHub Action setup-go

If you are developing and running workflows on GitHub using Golang, and the recent release of Golang 1.16 had features you want or need, then you might want to know about this GitHub Action setup-go.

Essentially the way it works is that ubuntu-latest on GitHub has the last three major versions of Golang in the cache, but you have to properly switch between them. setup-go does that for you, and if you are using a version of Golang that doesn’t come pre-installed in the cache, it will install it for you. This is quite handy, and super easy to use:

  - uses: actions/setup-go@v2
      go-version: '1.16'

Happy hacking!


You can use your Mastodon account to reply to this post.