File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
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 # 需要包含的额外文件
You can’t perform that action at this time.
0 commit comments