Is it possible to use preview releases of the Go language with GitHub Actions?
Currently there is a 1.18 beta out and I'd like to start using some of the new changes in my projects already.
CodePudding user response:
It seems it's not yet available through that action, but you can always install it manually.
Here's an example:
name: Golang
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.17.5
- name: Install beta version
run: |
go install golang.org/dl/go1.18beta1@latest
go1.18beta1 download
cp $(which go1.18beta1) $(which go)
go version