should work now #50
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 Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| runner: ubuntu-latest | |
| - arch: aarch64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runner }} | |
| container: | |
| image: ubuntu:24.04@sha256:c35e29c9450151419d9448b0fd75374fec4fff364a27f176fb458d472dfc9e54 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y \ | |
| curl \ | |
| git \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libfuse2 \ | |
| xdg-utils \ | |
| file | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.6" # Match flake's nodejs_20 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.90.0 | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build AppImage only | |
| run: | | |
| . "$HOME/.cargo/env" | |
| npm run tauri build -- --bundles appimage | |
| - name: Upload AppImage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: korppi-linux-${{ matrix.arch }}-appimage | |
| path: src-tauri/target/release/bundle/appimage/*.AppImage | |
| if-no-files-found: error | |
| # ───────────────────────────────────────────── | |
| # macOS (.dmg) | |
| # ───────────────────────────────────────────── | |
| macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: aarch64 | |
| target: aarch64-apple-darwin | |
| runner: macos-latest | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.6" # Match flake's nodejs_20 | |
| cache: npm | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.90.0" # Pin to current stable for reproducibility | |
| targets: ${{ matrix.target }} | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build .dmg | |
| run: npm run tauri build -- --target ${{ matrix.target }} | |
| - name: Upload dmg | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: korppi-macos-${{ matrix.arch }}-dmg | |
| path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
| if-no-files-found: error | |
| # ───────────────────────────────────────────── | |
| # Windows (.exe + .msi) | |
| # ───────────────────────────────────────────── | |
| windows: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| target: x86_64-pc-windows-msvc | |
| runner: windows-latest | |
| - arch: aarch64 | |
| target: aarch64-pc-windows-msvc | |
| runner: windows-latest | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.6" # Match flake's nodejs_20 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.90.0" # Pin to current stable for reproducibility | |
| targets: ${{ matrix.target }} | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build Windows binaries | |
| run: npm run tauri build -- --target ${{ matrix.target }} | |
| - name: Upload MSI | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: korppi-windows-${{ matrix.arch }}-msi | |
| path: src-tauri/target/**/release/bundle/msi/*.msi | |
| if-no-files-found: warn | |
| - name: Upload EXE | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: korppi-windows-${{ matrix.arch }}-exe | |
| path: src-tauri/target/**/release/bundle/nsis/*.exe | |
| if-no-files-found: warn | |
| # ───────────────────────────────────────────── | |
| # Release | |
| # ───────────────────────────────────────────── | |
| release: | |
| needs: [linux, macos, windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: false | |
| generate_release_notes: true | |
| files: | | |
| artifacts/**/*.AppImage | |
| artifacts/**/*.dmg | |
| artifacts/**/*.exe | |
| artifacts/**/*.msi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |