Skip to content

Android Build

Android Build #16

Workflow file for this run

name: Android Build
on:
workflow_run:
workflows: ["Electron Build and Release"]
types:
- completed
jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./capacitor
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
fetch-tags: true
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9.4.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19'
check-latest: true
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install node-pre-gyp
run: pnpm install -g node-pre-gyp
- name: Build native package
run: pnpm run build:native
- name: Build Web
env:
NODE_ENV: production
run: pnpm run build:web
- name: Sync
run: pnpm exec cap sync android
- name: Build App
run: cd android && chmod +x ./gradlew && ./gradlew assembleDebug
- name: Upload APK to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch --tags && gh release upload $(gh release list --limit 1 --json tagName --jq '.[0].tagName') ./android/app/build/outputs/apk/debug/app-debug.apk