File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build Android APK
22
33on :
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
912jobs :
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
You can’t perform that action at this time.
0 commit comments