feat(android): add Capacitor setup for Android APK builds
- Migrate web assets from root to www/ directory - Add Android native project with Capacitor 8 - Add GitHub Actions workflow for automated APK builds - Configure app identity and splash screens
This commit is contained in:
46
.github/workflows/build-apk.yml
vendored
Normal file
46
.github/workflows/build-apk.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Build Android APK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Sync Capacitor
|
||||
run: npx cap sync android
|
||||
|
||||
- name: Build APK
|
||||
working-directory: android
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: impostor-game-debug
|
||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user