name: Build All Platforms on: push: tags: ['v*'] workflow_dispatch: env: CARGO_TERM_COLOR: always jobs: # Windows GUI Build build-windows: runs-on: windows-latest timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-action@stable - name: Install Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install frontend dependencies run: cd web && npm ci - name: Build frontend run: cd web && npm run build - name: Build GUI run: cargo build --release --features gui - name: Create package run: | mkdir dist cp target/release/impress_asr_gui.exe dist/ cp target/release/impress_asr.exe dist/ cp README.md dist/ cp LICENSE dist/ mkdir dist/models echo "Download models from: https://huggingface.co/FunAudioLLM/SenseVoiceSmall" > dist/models/README.txt - name: Upload artifact uses: actions/upload-artifact@v4 with: name: impress-asr-windows-x64 path: dist/ # Linux GUI Build (requires system dependencies) build-linux: runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v4 - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y \ libgtk-3-dev \ libwebkit2gtk-4.1-dev \ libappindicator3-dev \ librsvg2-dev \ libssl-dev - name: Install Rust uses: dtolnay/rust-action@stable - name: Install Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install frontend dependencies run: cd web && npm ci - name: Build frontend run: cd web && npm run build - name: Build GUI run: cargo build --release --features gui - name: Create AppImage (optional) run: | # AppImage build requires additional setup echo "AppImage build skipped - configure with tauri-apps/tauri-action" - name: Upload artifact uses: actions/upload-artifact@v4 with: name: impress-asr-linux-x64 path: target/release/impress_asr_gui # macOS GUI Build build-macos: runs-on: macos-latest timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-action@stable - name: Install Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install frontend dependencies run: cd web && npm ci - name: Build frontend run: cd web && npm run build - name: Build GUI run: cargo build --release --features gui - name: Create DMG (optional) run: | echo "DMG build skipped - configure with tauri-apps/tauri-action" - name: Upload artifact uses: actions/upload-artifact@v4 with: name: impress-asr-macos-x64 path: target/release/impress_asr_gui # Create Release (only when tagged) create-release: needs: [build-windows, build-linux, build-macos] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') permissions: contents: write steps: - name: Download Windows artifact uses: actions/download-artifact@v4 with: name: impress-asr-windows-x64 path: ./release/windows - name: Download Linux artifact uses: actions/download-artifact@v4 with: name: impress-asr-linux-x64 path: ./release/linux - name: Download macOS artifact uses: actions/download-artifact@v4 with: name: impress-asr-macos-x64 path: ./release/macos - name: Create ZIP archives run: | cd release zip -r impress-asr-${{ github.ref_name }}-windows-x64.zip windows/ zip -r impress-asr-${{ github.ref_name }}-linux-x64.zip linux/ zip -r impress-asr-${{ github.ref_name }}-macos-x64.zip macos/ - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: files: release/*.zip generate_release_notes: true draft: true