Build Mac #1
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: Build Mac | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack and install Yarn | |
| run: | | |
| corepack enable | |
| yarn --version | |
| - name: Install frontend dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Build Tauri app (universal binary) | |
| run: yarn tauri build --target universal-apple-darwin | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| - name: Upload installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: game-library-mac | |
| path: | | |
| src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | |
| src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app | |
| if-no-files-found: error | |
| retention-days: 30 |