Release #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag (e.g. v0.1.2)' | |
| required: true | |
| default: 'v0.1.0' | |
| jobs: | |
| build: | |
| name: Build for ${{ matrix.target }} | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-pc-windows-msvc | |
| arch: x64 | |
| - target: i686-pc-windows-msvc | |
| arch: x86 | |
| - target: aarch64-pc-windows-msvc | |
| arch: arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # ── System setup ───────────────────────────────────────────────────────── | |
| - name: Install build tools (WIX, NSIS) | |
| run: | | |
| choco install wixtoolset nsis -y --no-progress | |
| echo "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| # ── Bun + frontend ────────────────────────────────────────────────────── | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install frontend dependencies | |
| run: bun install | |
| # ── Rust ──────────────────────────────────────────────────────────────── | |
| - name: Set up Rust (${{ matrix.target }}) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Rust build | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| key: ${{ matrix.target }} | |
| # ── Build & bundle ────────────────────────────────────────────────────── | |
| - name: Build Tauri app (${{ matrix.arch }}) | |
| run: bun run tauri build -- --target ${{ matrix.target }} | |
| # ── Upload artifacts ──────────────────────────────────────────────────── | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ matrix.arch }} | |
| path: src-tauri/target/${{ matrix.target }}/release/bundle/ | |
| retention-days: 1 | |
| release: | |
| name: Create GitHub Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # ── Download all artifacts ────────────────────────────────────────────── | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| # ── Create release ────────────────────────────────────────────────────── | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: '⚡ Process Manager ${{ github.ref_name }}' | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| artifacts/release-*/msi/*.msi | |
| artifacts/release-*/nsis/*.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |