File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a golang project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+ name : Go
5+
6+ on :
7+ push :
8+ tags :
9+ - ' *'
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ goos : [linux, windows, darwin] # 需要打包的系统
17+ goarch : [amd64, arm64] # 需要打包的架构
18+ exclude : # 排除某些平台和架构
19+ - goarch : arm64
20+ goos : windows
21+ steps :
22+ - uses : actions/checkout@v3
23+
24+ - name : Set up Go
25+ uses : wangyoucao577/go-release-action@v1.30
26+ with :
27+ go-version : ' 1.21'
28+ github_token : ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
29+ goos : ${{ matrix.goos }}
30+ goarch : ${{ matrix.goarch }}
31+ binary_name : leetcode-tool # 可以指定二进制文件的名称
32+
You can’t perform that action at this time.
0 commit comments