|
| 1 | +name: Native App Build |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + target: |
| 7 | + description: "Native target to build" |
| 8 | + required: true |
| 9 | + default: "linux" |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - linux |
| 13 | + - macos |
| 14 | + - windows |
| 15 | + - desktop-all |
| 16 | + |
| 17 | +permissions: |
| 18 | + contents: read |
| 19 | + |
| 20 | +concurrency: |
| 21 | + group: native-app-build-${{ github.ref }}-${{ inputs.target }} |
| 22 | + cancel-in-progress: false |
| 23 | + |
| 24 | +jobs: |
| 25 | + linux: |
| 26 | + name: Build Linux AppImage and deb |
| 27 | + if: inputs.target == 'linux' || inputs.target == 'desktop-all' |
| 28 | + runs-on: ubuntu-22.04 |
| 29 | + steps: |
| 30 | + - name: Checkout |
| 31 | + uses: actions/checkout@v6 |
| 32 | + |
| 33 | + - name: Install Linux Tauri dependencies |
| 34 | + run: | |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf |
| 37 | +
|
| 38 | + - name: Set up Node |
| 39 | + uses: actions/setup-node@v4 |
| 40 | + with: |
| 41 | + node-version: 22 |
| 42 | + |
| 43 | + - name: Set up pnpm |
| 44 | + run: | |
| 45 | + corepack enable |
| 46 | + corepack prepare pnpm@11.9.0 --activate |
| 47 | +
|
| 48 | + - name: Set up Rust |
| 49 | + uses: dtolnay/rust-toolchain@stable |
| 50 | + |
| 51 | + - name: Install dependencies |
| 52 | + run: pnpm install --frozen-lockfile |
| 53 | + |
| 54 | + - name: Run release preflight |
| 55 | + run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target linux --soft |
| 56 | + |
| 57 | + - name: Build native bundle |
| 58 | + run: pnpm --filter @jcode.labs/mimir-app tauri:build:linux |
| 59 | + |
| 60 | + - name: Generate checksums |
| 61 | + run: pnpm --filter @jcode.labs/mimir-app release:checksums |
| 62 | + |
| 63 | + - name: Generate release manifest |
| 64 | + run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target linux |
| 65 | + |
| 66 | + - name: Upload native bundle |
| 67 | + uses: actions/upload-artifact@v4 |
| 68 | + with: |
| 69 | + name: mimir-app-linux-${{ github.sha }} |
| 70 | + path: packages/mimir-app/src-tauri/target/release/bundle/ |
| 71 | + if-no-files-found: error |
| 72 | + |
| 73 | + macos: |
| 74 | + name: Build macOS app and dmg |
| 75 | + if: inputs.target == 'macos' || inputs.target == 'desktop-all' |
| 76 | + runs-on: macos-latest |
| 77 | + steps: |
| 78 | + - name: Checkout |
| 79 | + uses: actions/checkout@v6 |
| 80 | + |
| 81 | + - name: Set up Node |
| 82 | + uses: actions/setup-node@v4 |
| 83 | + with: |
| 84 | + node-version: 22 |
| 85 | + |
| 86 | + - name: Set up pnpm |
| 87 | + run: | |
| 88 | + corepack enable |
| 89 | + corepack prepare pnpm@11.9.0 --activate |
| 90 | +
|
| 91 | + - name: Set up Rust |
| 92 | + uses: dtolnay/rust-toolchain@stable |
| 93 | + |
| 94 | + - name: Install dependencies |
| 95 | + run: pnpm install --frozen-lockfile |
| 96 | + |
| 97 | + - name: Run release preflight |
| 98 | + run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target macos --soft |
| 99 | + |
| 100 | + - name: Build native bundle |
| 101 | + run: pnpm --filter @jcode.labs/mimir-app tauri:build:macos |
| 102 | + |
| 103 | + - name: Generate checksums |
| 104 | + run: pnpm --filter @jcode.labs/mimir-app release:checksums |
| 105 | + |
| 106 | + - name: Generate release manifest |
| 107 | + run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target macos |
| 108 | + |
| 109 | + - name: Upload native bundle |
| 110 | + uses: actions/upload-artifact@v4 |
| 111 | + with: |
| 112 | + name: mimir-app-macos-${{ github.sha }} |
| 113 | + path: packages/mimir-app/src-tauri/target/release/bundle/ |
| 114 | + if-no-files-found: error |
| 115 | + |
| 116 | + windows: |
| 117 | + name: Build Windows NSIS and MSI |
| 118 | + if: inputs.target == 'windows' || inputs.target == 'desktop-all' |
| 119 | + runs-on: windows-latest |
| 120 | + steps: |
| 121 | + - name: Checkout |
| 122 | + uses: actions/checkout@v6 |
| 123 | + |
| 124 | + - name: Set up Node |
| 125 | + uses: actions/setup-node@v4 |
| 126 | + with: |
| 127 | + node-version: 22 |
| 128 | + |
| 129 | + - name: Set up pnpm |
| 130 | + shell: bash |
| 131 | + run: | |
| 132 | + corepack enable |
| 133 | + corepack prepare pnpm@11.9.0 --activate |
| 134 | +
|
| 135 | + - name: Set up Rust |
| 136 | + uses: dtolnay/rust-toolchain@stable |
| 137 | + |
| 138 | + - name: Install dependencies |
| 139 | + run: pnpm install --frozen-lockfile |
| 140 | + |
| 141 | + - name: Run release preflight |
| 142 | + run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target windows --soft |
| 143 | + |
| 144 | + - name: Build native bundle |
| 145 | + run: pnpm --filter @jcode.labs/mimir-app tauri:build:windows |
| 146 | + |
| 147 | + - name: Generate checksums |
| 148 | + run: pnpm --filter @jcode.labs/mimir-app release:checksums |
| 149 | + |
| 150 | + - name: Generate release manifest |
| 151 | + run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target windows |
| 152 | + |
| 153 | + - name: Upload native bundle |
| 154 | + uses: actions/upload-artifact@v4 |
| 155 | + with: |
| 156 | + name: mimir-app-windows-${{ github.sha }} |
| 157 | + path: packages/mimir-app/src-tauri/target/release/bundle/ |
| 158 | + if-no-files-found: error |
0 commit comments