Update android-ci.yml #220
This file contains 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" ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build APKs | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build-type: [debug, release] | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Give permission to executable | |
run: chmod +x gradlew | |
- name: Generate APK | |
run: ./gradlew assemble${{ matrix.build-type }} | |
- name: List APK files | |
run: ls -R app/build/outputs/apk/ | |
- name: Upload APK | |
uses: actions/upload-artifact@master | |
with: | |
name: app-${{ matrix.build-type }} | |
path: app/build/outputs/apk/${{ matrix.build-type }}/*.apk |