Skip to content

Commit 8bde0d0

Browse files
authored
Create build-apk.yml
1 parent 1e2d927 commit 8bde0d0

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/build-apk.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Zashboard Android
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-android:
11+
name: Build Android APKs
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 18
22+
23+
- name: Install dependencies
24+
run: |
25+
npm ci
26+
npm run build || echo "skip if not a Node project"
27+
28+
- name: Install Capacitor and Android tools
29+
run: |
30+
npm install @capacitor/core @capacitor/cli
31+
npx cap sync android
32+
33+
- name: Setup JDK
34+
uses: actions/setup-java@v4
35+
with:
36+
distribution: 'temurin'
37+
java-version: '17'
38+
39+
- name: Setup Android SDK
40+
uses: android-actions/setup-android@v3
41+
42+
- name: Build Debug APK (multi-arch)
43+
run: |
44+
cd android
45+
./gradlew assembleDebug
46+
47+
- name: Upload APKs
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: Zashboard-Android-APKs
51+
path: |
52+
android/app/build/outputs/apk/**/*.apk

0 commit comments

Comments
 (0)