From 2bd67a5afc84e34d258bd119ee2d9dd9500a9675 Mon Sep 17 00:00:00 2001 From: "tao.chen" <93983997+taochen-ct@users.noreply.github.com> Date: Tue, 14 Jul 2026 19:19:35 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20release=20=E5=90=8E=E8=B0=83=20Bark=20?= =?UTF-8?q?=E6=8E=A8=E9=80=81=20release=20=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release job 在 softprops/action-gh-release@v2 上传完 spark-mcp-linux-amd64 后, 调 Bark (http://101.43.40.124:81/push) 推 一条 device_key 绑定的通知, 标题用 github.ref_name (e.g. v0.0.1-beta), body 带 release 页面 URL. device_key 直接写进 workflow, 是公开的推送 key, group=backup 归档, ttl=3600 (1 小时后从 Bark 设备上消失). if: success() 保证 release upload 失败时不会发通知, 避免推送 "已发布" 但实际没有的误导信息. Co-Authored-By: Claude --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 607e134..8aaa03d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,3 +76,24 @@ jobs: with: files: spark-mcp-linux-amd64 generate_release_notes: true + + - name: Notify release via Bark + if: success() + run: | + TITLE="${{ github.ref_name }}" + BODY="spark-mcp ${TITLE} released: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TITLE}" + curl -s \ + -X POST http://101.43.40.124:81/push \ + -H "Content-Type: application/json; charset=utf-8" \ + -d "$(jq -n \ + --arg device_key "6ZFVsxM95cuAjYoNLWSWaN" \ + --arg title "$TITLE" \ + --arg body "$BODY" \ + '{ + device_key: $device_key, + title: $title, + body: $body, + group: "backup", + isArchive: 1, + ttl: 3600 + }')"