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",