App file updated. #3
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: Build Android | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
JDK_VERSION: '17' | |
ANDROID_API_LEVEL: 30 | |
ANDROID_BUILD_TOOLS_VERSION: 30.0.3 | |
NDK_VERSION: 21.4.7075529 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
node-version: '20' | |
path: | | |
~/.npm | |
~/.cache/yarn | |
node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: yarn install | |
- name: Build Android app | |
run: | | |
cd android | |
./gradlew assembleRelease | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release | |
path: android/app/build/outputs/apk/release/app-release.apk |