From a6138fd62bd11db8b419dd421251e8ee1d8f4da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B5=E6=91=87=E5=B0=8F=E5=AD=90?= Date: Mon, 1 Jun 2026 10:20:32 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20GitHub=20Actions?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA=20release=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 推送 v* 标签时自动在 macOS 多架构构建 .dmg - 自动创建 GitHub Release 并附加构建产物 - 升级版本至 v1.1.0 Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 62 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..da6ae28 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,62 @@ +name: Build & Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + include: + - platform: macos-arm64 + arch: arm64 + - platform: macos-x64 + arch: x64 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: '9' + + - name: Install Dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Build DMG + run: pnpm run build:mac -- ${{ matrix.platform }} + + - name: Upload Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ env.UPLOAD_URL }} + asset_path: out/${{ matrix.platform }}/WechatExplorer-${{ env.VERSION }}-${{ matrix.platform }}.dmg + asset_name: WechatExplorer-${{ env.VERSION }}-${{ matrix.platform }}.dmg + asset_content_type: application/x-apple-diskimage + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index 41c3866..f73aab8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wechatexplorer", - "version": "1.0.3", + "version": "1.1.0", "description": "mac 版本获取微信聊天记录, AI群聊总结助手", "keywords": [ "wechat",