英文:
Using Go beta releases with GitHub Actions
问题
可以使用 GitHub Actions 来使用 Go 语言的预览版本吗?
目前有一个 1.18 beta 版本,我想在我的项目中开始使用一些新的变化。
英文:
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.
答案1
得分: 3
似乎还不能通过该操作来获取,但你可以手动安装。
以下是一个示例:
name: Golang
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 设置 Go
uses: actions/setup-go@v2
with:
go-version: 1.17.5
- name: 安装 beta 版本
run: |
go install golang.org/dl/go1.18beta1@latest
go1.18beta1 download
cp $(which go1.18beta1) $(which go)
go version
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论