merge: Merge pull request #15 from youfeng11/renovate/ksp-monorepo #39
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: Android CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Parse SDK versions | |
| id: parse-versions | |
| run: | | |
| COMPILE_SDK=$(grep -R "release(" app/build.gradle.kts \ | |
| | sed -E 's/.*release\(([0-9]+)\).*/\1/') | |
| echo "Found compileSdk: $COMPILE_SDK" | |
| echo "COMPILE_SDK=$COMPILE_SDK" >> $GITHUB_ENV | |
| - name: Set up Android SDK and NDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| packages: "platforms;android-${{ env.COMPILE_SDK }} ndk;25.2.9519653" | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew assembleDebug --build-cache --warning-mode all | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/*.apk |