Deploy the web app to cascade.stephens.page on every push to main. #10
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
| # Builds the Android app (Rust core via cargo-ndk for all ABIs + Kotlin) as a | |
| # compile check. Mirrors windows.yml / apple.yml; the matching release lives in | |
| # release-android.yml. Debug build for speed — the release workflow does the | |
| # optimized, publishable APK. | |
| name: Android build | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "apps/android/**" | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "apps/web/public/sounds/waterfall.ogg" | |
| - ".github/workflows/android.yml" | |
| pull_request: | |
| paths: | |
| - "apps/android/**" | |
| - "crates/**" | |
| - ".github/workflows/android.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Set up Android SDK + NDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install NDK + platform | |
| run: | | |
| sdkmanager --install "ndk;26.3.11579264" "platforms;android-35" "build-tools;35.0.0" | |
| echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.3.11579264" >> "$GITHUB_ENV" | |
| - name: Install Rust + Android targets | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-ndk | |
| run: cargo install cargo-ndk --locked | |
| - name: Build debug APK | |
| working-directory: apps/android | |
| run: ./gradlew :app:assembleDebug --no-daemon |