Skip to content

Commit ed8b56b

Browse files
author
spiralgang
committed
build: Update Android build workflow for proper APK compilation
1 parent 89f2fa2 commit ed8b56b

1 file changed

Lines changed: 30 additions & 10 deletions

File tree

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: Build Android APK
22

33
on:
4-
workflow_run:
5-
workflows: ["Align Android Config Bot"]
6-
types:
7-
- completed
4+
push:
5+
branches:
6+
- partitioned-main
7+
pull_request:
8+
branches:
9+
- partitioned-main
10+
workflow_dispatch:
811

912
jobs:
1013
build:
11-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1214
runs-on: ubuntu-latest
1315

1416
steps:
@@ -21,10 +23,19 @@ jobs:
2123
java-version: '17'
2224
distribution: 'temurin'
2325

26+
- name: Setup Android SDK
27+
uses: android-actions/setup-android@v3
28+
with:
29+
packages: tools platform-tools build-tools-34.0.0
30+
ndk: '25.1.8937393'
31+
2432
- name: Install Frontend Dependencies
2533
run: |
26-
cd web-terminal
27-
npm install
34+
if [ -d "web-terminal" ]; then
35+
cd web-terminal
36+
npm install
37+
cd ..
38+
fi
2839
2940
- name: Validate Gradle wrapper
3041
uses: gradle/wrapper-validation-action@v2
@@ -35,11 +46,20 @@ jobs:
3546
- name: Make gradlew executable
3647
run: chmod +x ./gradlew
3748

38-
- name: Build with Gradle
39-
run: ./gradlew build
49+
- name: Build Debug APK
50+
run: ./gradlew assembleDebug
51+
52+
- name: Build Release APK
53+
run: ./gradlew assembleRelease
4054

41-
- name: Upload APK
55+
- name: Upload Debug APK
4256
uses: actions/upload-artifact@v4
4357
with:
4458
name: debug-apk
4559
path: app/build/outputs/apk/debug/app-debug.apk
60+
61+
- name: Upload Release APK
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: release-apk
65+
path: app/build/outputs/apk/release/app-release-unsigned.apk

0 commit comments

Comments
 (0)