Added pull_request trigger to Android CI workflow (#5) #13
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: [master] | |
| paths: | |
| - 'android/**' | |
| - '.github/workflows/android-ci.yml' | |
| pull_request: | |
| branches: [master] | |
| paths: | |
| - 'android/**' | |
| - '.github/workflows/android-ci.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: android | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Decode google-services.json | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: echo "$GOOGLE_SERVICES_JSON" | base64 -d > app/google-services.json | |
| - name: Run unit tests | |
| run: ./gradlew :core-domain:test | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-release | |
| path: android/app/build/outputs/apk/release/*.apk |