From 5630197aab808240a2100d98c906bd7a72e31cbb Mon Sep 17 00:00:00 2001 From: chuck <361648887@qq.com> Date: Tue, 28 Apr 2026 15:36:29 +0800 Subject: [PATCH] =?UTF-8?q?ci(github-actions):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E5=B9=B3=E5=8F=B0=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置 release 事件触发器以支持发布流程 - 添加 Upload Release Assets 作业用于上传构建产物 - 集成 softprops/action-gh-release 动作处理发布资产 - 配置多平台二进制文件 (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64) - 设置 GitHub Token 环境变量用于发布认证 --- .github/workflows/go.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 159d8f9..8318634 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,6 +8,8 @@ on: branches: [ "master" ] pull_request: branches: [ "master" ] + release: + types: [created] jobs: @@ -24,3 +26,14 @@ jobs: - name: Build run: ./build.sh + - name: Upload Release Assets + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: | + bin/somcli-linux-amd64 + bin/somcli-linux-arm64 + bin/somcli-darwin-amd64 + bin/somcli-darwin-arm64 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file