简体   繁体   中英

Using Go beta releases with GitHub Actions

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM