Build Debug APK #2
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 Debug APK | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: build-debug-apk-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-debug-apk: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build debug APK | |
| working-directory: android | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew --no-daemon --console=plain --stacktrace :app:assembleDebug | |
| - name: Normalize APK artifact | |
| run: | | |
| apk_path=$(find android/app/build/outputs/apk/debug -name '*.apk' | head -n 1) | |
| test -n "$apk_path" || { | |
| echo "Debug APK not found"; | |
| exit 1; | |
| } | |
| cp "$apk_path" app-debug.apk | |
| - name: Upload APK artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-debug-apk | |
| path: app-debug.apk |