Skip to content

Build Android APK

Build Android APK #1

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@v2
- 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: |
cd example
npm install
- name: Build APK
run: |
cd example/android
./gradlew assembleRelease
mv app/build/outputs/apk/release/app-release.apk app-release-$GITHUB_SHA.apk
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: app-release-$GITHUB_SHA.apk
path: example/android/app-release-$GITHUB_SHA.apk