Build debug APK in CI (closes #108) #125
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" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
KEYS_PROPERTIES: ${{ secrets.KEYS_PROPERTIES }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Create and populate keys.properties | |
run: | | |
touch keys.properties | |
echo "$KEYS_PROPERTIES" >> keys.properties | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build debug APK | |
run: ./gradlew packageDebug | |
- name: Build release APK | |
run: ./gradlew packageRelease | |
- name: Upload universal debug APK artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: androidApp-universal-debug.apk | |
path: androidApp/build/outputs/apk/debug/androidApp-universal-debug.apk | |
- name: Upload universal release APK artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: androidApp-universal-release.apk | |
path: androidApp/build/outputs/apk/release/androidApp-universal-release.apk |