fix? #5
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 Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v2 | |
with: | |
api-level: 33 | |
build-tools: 33.0.2 | |
target: android-33 | |
ndk: 25.2.9519653 | |
- name: Build Debug APK | |
run: ./gradlew assembleDebug | |
- name: Upload Debug APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Debug APK | |
path: app/build/outputs/apk/debug/*.apk | |
- name: Build Release APK | |
env: | |
SIGNING_KEYSTORE: ${{ secrets.SIGNING_KEYSTORE }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
run: ./gradlew assembleRelease | |
- name: Upload Release APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release APK | |
path: app/build/outputs/apk/release/*.apk |