name: Release on: workflow_dispatch: # 手动触发,用于集成测试 push: tags: - 'v*' jobs: # 调用各平台构建工作流 build-windows: uses: ./.github/workflows/build-windows.yml secrets: inherit build-macos-arm64: uses: ./.github/workflows/build-macos-arm64.yml secrets: inherit build-macos-x64: uses: ./.github/workflows/build-macos-x64.yml secrets: inherit build-linux: uses: ./.github/workflows/build-linux.yml secrets: inherit # 所有构建完成后创建 Release release: needs: [build-windows, build-macos-arm64, build-macos-x64, build-linux] runs-on: ubuntu-latest permissions: contents: write steps: - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts pattern: artifacts-* merge-multiple: true - name: List artifacts run: ls -la artifacts/ - name: Create Release uses: softprops/action-gh-release@v1 with: body: | ## Downloads ### Windows - `*-win-x64-setup.exe` - NSIS 安装程序 (推荐) - `*-win-x64-portable.exe` - 便携版 - `*-win-x64.msi` - MSI 安装程序 ### macOS - `*-mac-arm64.dmg` - Apple Silicon (M1/M2/M3) - `*-mac-x64.dmg` - Intel ### Linux - `*-linux-x64.deb` - Debian/Ubuntu - `*-linux-x64.rpm` - Fedora/RHEL/CentOS - `*-linux-x64.AppImage` - 通用 AppImage draft: false prerelease: false files: artifacts/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}