Skip to content

Build Android APK

Build Android APK #6

Workflow file for this run

name: Build Android APK
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install dependencies
run: |
npm install
cd example
npm install
- name: Build APK
run: |
npm run prepack
cd example/android
./gradlew assembleRelease
mv app/build/outputs/apk/release/app-release.apk app-release-${{ github.sha }}.apk
ls
pwd
echo ${{ github.workspace }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release-${{ github.sha }}.apk
path: example/android/app-release-${{ github.sha }}.apk