We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53d1948 commit 6074b38Copy full SHA for 6074b38
.github/workflows/go-binary-release.yml
@@ -0,0 +1,26 @@
1
+name: build
2
+
3
+on:
4
+ release:
5
+ types: [created,published] # 表示在创建新的 Release 时触发
6
7
+jobs:
8
+ build-go-binary:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ goos: [linux, windows, darwin] # 需要打包的系统
13
+ goarch: [amd64, arm64] # 需要打包的架构
14
+ exclude: # 排除某些平台和架构
15
+ - goarch: arm64
16
+ goos: windows
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - uses: wangyoucao577/go-release-action@v1
20
+ with:
21
+ github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
22
+ goos: ${{ matrix.goos }}
23
+ goarch: ${{ matrix.goarch }}
24
+ goversion: 1.18 # 可以指定编译使用的 Golang 版本
25
+ binary_name: "go-ldap-admin" # 可以指定二进制文件的名称
26
+ extra_files: LICENSE config.yml go-ldap-admin-priv.pem go-ldap-admin-pub.pem rbac_model.conf README.md # 需要包含的额外文件
0 commit comments