Fix TS2345: handle nullable exit code in DockerSetup #3
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 Tauri App | |
| on: | |
| push: | |
| branches: [main, dev] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: ubuntu-22.04 | |
| target: linux | |
| - platform: macos-latest | |
| target: macos | |
| - platform: windows-latest | |
| target: windows | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri -> target | |
| - name: Install Linux dependencies | |
| if: matrix.target == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: ${{ github.ref_type == 'tag' && github.ref_name || '' }} | |
| releaseName: ${{ github.ref_type == 'tag' && format('CardputerZero AppBuilder {0}', github.ref_name) || '' }} | |
| releaseBody: "See the assets below to download and install." | |
| releaseDraft: ${{ github.ref_type == 'tag' }} | |
| prerelease: false | |
| - name: Upload artifacts | |
| if: github.ref_type != 'tag' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cardputerzero-appbuilder-${{ matrix.target }} | |
| path: | | |
| src-tauri/target/release/bundle/deb/*.deb | |
| src-tauri/target/release/bundle/appimage/*.AppImage | |
| src-tauri/target/release/bundle/dmg/*.dmg | |
| src-tauri/target/release/bundle/macos/*.app | |
| src-tauri/target/release/bundle/msi/*.msi | |
| src-tauri/target/release/bundle/nsis/*.exe | |
| retention-days: 30 |