@@ -17,22 +17,47 @@ jobs:
1717 steps :
1818 - name : Download repository
1919 uses : actions/checkout@v2
20-
20+
2121 - name : Setup Java
2222 uses : actions/setup-java@v2
2323 with :
2424 distribution : ' adopt'
2525 java-version : ' 11'
26-
26+
2727 - name : Build with Gradle
28- run : bash ./gradlew build --stacktrace
29-
28+ run : |
29+ bash ./gradlew build --stacktrace
30+ bash ./gradlew bundle --stacktrace
31+
3032 - name : Upload APK
3133 uses : actions/upload-artifact@v2
3234 with :
3335 name : pslab-android-apk
3436 path : |
35- app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
36- app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk
37- app/build/outputs/apk/playstore/debug/app-playstore-debug.apk
38- app/build/outputs/apk/playstore/release/app-playstore-release-unsigned.apk
37+ app/build/outputs/apk/debug/app-debug.apk
38+ app/build/outputs/apk/release/app-release-unsigned.apk
39+
40+ - name : Download Artifact
41+ uses : actions/download-artifact@v2
42+ with :
43+ name : pslab-android-apk
44+
45+ - name : Add APK files to apk branch
46+ if : github.ref=='refs/heads/master'
47+ run : |
48+ git config user.name github-actions
49+ git config user.email github-actions@github.com
50+ git stash
51+ git switch --orphan temp
52+ git push origin --delete apk
53+ git branch -m apk
54+ git config user.name github-actions
55+ git config user.email github-actions@github.com
56+ git add app/build/outputs/bundle/debug/app-debug.aab
57+ git add app/build/outputs/bundle/release/app-release.aab
58+ git add debug/app-debug.apk
59+ git add release/app-release-unsigned.apk
60+ git commit -m "Updated Build"
61+ git push origin apk --force
62+
63+
0 commit comments