Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

ci: add release workflow with tag and manual triggers

hairyfa2d3f68c5e59
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..ff6562cc
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,165 @@
+name: Build & Release
+
+on:
+ # 正式发布:推送 v* tag 触发
+ # git tag -a v0.1.0 -m "release: DeepSeek Harness Desktop v0.1.0"
+ # git push origin v0.1.0
+ push:
+ tags:
+ - 'v*'
+ # 手动触发:支持单平台、多平台测试打包
+ workflow_dispatch:
+ inputs:
+ platform_filter:
+ description: '选择需要打包的平台 (仅在手动触发时生效)'
+ required: true
+ default: 'all'
+ type: choice
+ options:
+ - all
+ - macos-aarch64
+ - macos-x86_64
+ - windows
+ - linux
+
+permissions:
+ contents: write
+
+env:
+ TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
+ TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
+
+jobs:
+ publish:
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - id: macos-aarch64
+ platform: 'macos-latest'
+ args: '--target aarch64-apple-darwin'
+ arch: 'aarch64'
+ - id: macos-x86_64
+ platform: 'macos-latest'
+ args: '--target x86_64-apple-darwin'
+ arch: 'x86_64'
+ - id: windows
+ platform: 'windows-latest'
+ args: ''
+ - id: linux
+ platform: 'ubuntu-latest'
+ args: ''
+
+ runs-on: ${{ matrix.platform }}
+
+ steps:
+ - name: Check if this platform should run
+ id: check
+ shell: bash
+ run: |
+ # Tag 触发全部构建;手动触发时仅构建与 platform_filter 匹配的平台
+ if [ "${{ github.event_name }}" = "push" ] || \
+ [ "${{ github.event.inputs.platform_filter }}" = "all" ] || \
+ [ "${{ github.event.inputs.platform_filter }}" = "${{ matrix.id }}" ]; then
+ echo "should_run=true" >> $GITHUB_OUTPUT
+ echo "平台匹配成功,开始构建..."
+ else
+ echo "should_run=false" >> $GITHUB_OUTPUT
+ echo "平台不匹配,将跳过后续构建步骤。"
+ fi
+
+ - name: Checkout repository
+ if: steps.check.outputs.should_run == 'true'
+ uses: actions/checkout@v4
+
+ - name: Install pnpm
+ if: steps.check.outputs.should_run == 'true'
+ uses: pnpm/action-setup@v4
+ with:
+ version: 10
+
+ - name: Setup Node.js
+ if: steps.check.outputs.should_run == 'true'
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+ cache: 'pnpm'
+ cache-dependency-path: 'pnpm-lock.yaml'
+
+ - name: Install Rust stable
+ if: steps.check.outputs.should_run == 'true'
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.platform == 'macos-latest' && (matrix.arch == 'aarch64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin') || '' }}
+
+ - name: Install dependencies (Ubuntu only)
+ if: steps.check.outputs.should_run == 'true' && matrix.platform == 'ubuntu-latest'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
+
+ - name: Install frontend dependencies
+ if: steps.check.outputs.should_run == 'true'
+ run: pnpm install --no-frozen-lockfile
+
+ - name: Generate Changelog
+ id: changelog
+ if: steps.check.outputs.should_run == 'true' && github.event_name == 'push'
+ uses: mikepenz/release-changelog-builder-action@v4
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build and Release (For Tags)
+ if: steps.check.outputs.should_run == 'true' && github.event_name == 'push'
+ uses: tauri-apps/tauri-action@v0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
+ TAURI_BUNDLE_TARGETS: ${{ matrix.platform == 'ubuntu-latest' && 'appimage' || 'all' }}
+ with:
+ tagName: ${{ github.ref_name }}
+ releaseName: 'DeepSeek Harness Desktop ${{ github.ref_name }}'
+ releaseBody: |
+ ${{ steps.changelog.outputs.changelog }}
+
+ ### 📦 Artifacts
+ - **macOS (Apple Silicon)**: 下载 `aarch64.dmg`
+ - **macOS (Intel)**: 下载 `x64.dmg`
+ - **Windows**: 下载 `.exe`
+ - **Linux**: 下载 `.AppImage`
+ releaseDraft: false
+ prerelease: false
+ includeUpdaterJson: true
+ args: ${{ matrix.args }}
+
+ # 手动触发:单平台/全平台测试打包(草稿 + 预发布,不打扰正式用户)
+ - name: Build and Create Test Release (For Manual Trigger)
+ if: steps.check.outputs.should_run == 'true' && github.event_name == 'workflow_dispatch'
+ uses: tauri-apps/tauri-action@v0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TAURI_BUNDLE_TARGETS: ${{ matrix.platform == 'ubuntu-latest' && 'appimage' || 'all' }}
+ with:
+ tagName: ${{ format('test-{0}-{1}', github.ref_name, github.run_number) }}
+ releaseName: "DeepSeek Harness Desktop 手动测试版 (构建 #${{ github.run_number }})"
+ releaseBody: |
+ DeepSeek Harness Desktop 手动触发的单平台/全平台测试构建。
+ 触发分支: `${{ github.ref_name }}`
+ 打包平台: `${{ github.event.inputs.platform_filter }}`
+ draft: true
+ prerelease: true
+ args: ${{ matrix.args }}
+
+ - name: Upload Artifacts (For Manual Trigger)
+ if: steps.check.outputs.should_run == 'true' && github.event_name == 'workflow_dispatch'
+ uses: actions/upload-artifact@v4
+ with:
+ name: deepseek-harness-desktop-${{ matrix.id }}
+ path: |
+ src-tauri/target/release/bundle/dmg/*.dmg
+ src-tauri/target/release/bundle/nsis/*.exe
+ src-tauri/target/release/bundle/msi/*.msi
+ src-tauri/target/release/bundle/appimage/*.AppImage
+ retention-days: 7