| 1 | name: Android |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | push: |
| 6 | branches: [ master ] |
| 7 | pull_request: |
| 8 | branches: [ master ] |
| 9 | |
| 10 | jobs: |
| 11 | build: |
| 12 | runs-on: ubuntu-latest |
| 13 | strategy: |
| 14 | fail-fast: false |
| 15 | matrix: |
| 16 | config: [debug, release] |
| 17 | include: |
| 18 | - config: debug |
| 19 | target: assembleDebug |
| 20 | apkname: espeak-debug.apk |
| 21 | - config: release |
| 22 | target: assembleRelease |
| 23 | apkname: espeak-release-unsigned.apk |
| 24 | name: Build ${{ matrix.config }} APK |
| 25 | steps: |
| 26 | - uses: actions/checkout@v4 |
| 27 | - name: Set up JDK 17 |
| 28 | uses: actions/setup-java@v4 |
| 29 | with: |
| 30 | distribution: 'temurin' |
| 31 | java-version: 17 |
| 32 | cache: gradle |
| 33 | - name: make |
| 34 | run: cd android && ./gradlew ${{ matrix.target }} --no-daemon |
| 35 | - name: upload |
| 36 | uses: actions/upload-artifact@v4 |
| 37 | with: |
| 38 | name: android-${{ matrix.config }}.apk |
| 39 | path: android/build/outputs/apk/${{ matrix.config }}/${{ matrix.apkname }} |
| 40 | retention-days: 5 |