add create release

This commit is contained in:
eryajf
2022-12-11 21:52:22 +08:00
parent a63b255b93
commit c06ac9b841
3 changed files with 29 additions and 23 deletions
+1 -21
View File
@@ -58,24 +58,4 @@ jobs:
# 给清单打上多个标签
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:${{ steps.date.outputs.today }}
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:latest
build-go-binary:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin] # 需要打包的系统
goarch: [amd64, arm64] # 需要打包的架构
exclude: # 排除某些平台和架构
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.30
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.18 # 可以指定编译使用的 Golang 版本
binary_name: "chatgpt-dingtalk" # 可以指定二进制文件的名称
extra_files: LICENSE README.md # 需要包含的额外文件
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:latest
+26
View File
@@ -0,0 +1,26 @@
name: build
on:
release:
types: [created] # 表示在创建新的 Release 时触发
jobs:
build-go-binary:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin] # 需要打包的系统
goarch: [amd64, arm64] # 需要打包的架构
exclude: # 排除某些平台和架构
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.30
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.18 # 可以指定编译使用的 Golang 版本
binary_name: "hello" # 可以指定二进制文件的名称
extra_files: LICENSE README.md # 需要包含的额外文件