added more layout options #32
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 ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-desktop: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-22.04, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies (Ubuntu only) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev | |
| - name: Install frontend dependencies | |
| working-directory: app | |
| run: npm ci | |
| - name: Build Tauri app | |
| working-directory: app | |
| run: npm run tauri:build | |
| - name: Upload artifacts (Ubuntu) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: | | |
| app/src-tauri/target/release/bundle/deb/*.deb | |
| app/src-tauri/target/release/bundle/appimage/*.AppImage | |
| - name: Upload artifacts (Windows) | |
| if: matrix.platform == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: | | |
| app/src-tauri/target/release/bundle/msi/*.msi | |
| app/src-tauri/target/release/bundle/nsis/*.exe | |
| - name: Upload artifacts (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: | | |
| app/src-tauri/target/release/bundle/dmg/*.dmg | |
| app/src-tauri/target/release/bundle/macos/*.app | |
| build-android: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android NDK | |
| run: | | |
| sdkmanager "ndk;25.2.9519653" | |
| - name: Install Rust Android targets | |
| run: | | |
| rustup target add aarch64-linux-android | |
| rustup target add armv7-linux-androideabi | |
| rustup target add i686-linux-android | |
| rustup target add x86_64-linux-android | |
| - name: Install frontend dependencies | |
| working-directory: app | |
| run: npm ci | |
| - name: Initialize Android project | |
| working-directory: app | |
| run: npm run tauri:android:init | |
| - name: Build Android app | |
| working-directory: app | |
| run: npm run tauri:android:build | |
| env: | |
| NDK_HOME: ${{ env.ANDROID_SDK_ROOT }}/ndk/25.2.9519653 | |
| - name: Upload Android artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-build | |
| path: | | |
| app/src-tauri/gen/android/app/build/outputs/apk/**/*.apk | |
| app/src-tauri/gen/android/app/build/outputs/bundle/**/*.aab | |
| build-ios: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install iOS targets | |
| run: | | |
| rustup target add aarch64-apple-ios | |
| rustup target add x86_64-apple-ios | |
| rustup target add aarch64-apple-ios-sim | |
| - name: Install frontend dependencies | |
| working-directory: app | |
| run: npm ci | |
| - name: Initialize iOS project | |
| working-directory: app | |
| run: npm run tauri:ios:init | |
| - name: Build iOS app (development) | |
| working-directory: app | |
| run: npm run tauri:ios:build -- --no-sign | |
| - name: Upload iOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-build | |
| path: | | |
| app/src-tauri/gen/apple/build/Build/Products/**/*.app |