@@ -25,30 +25,39 @@ jobs:
2525 uses : gradle/gradle-build-action@v3
2626
2727 - name : Decode Keystore
28+ if : secrets.SIGNING_KEYSTORE != ''
2829 run : echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > app/release.keystore
2930
3031 - name : Setup Gradle Signing Config
32+ if : secrets.SIGNING_KEYSTORE != ''
3133 run : |
3234 echo -e "\nSTORE_FILE=release.keystore" >> gradle.properties
3335 echo "STORE_PASSWORD=${{ secrets.STORE_PASSWORD }}" >> gradle.properties
3436 echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> gradle.properties
3537 echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> gradle.properties
3638
3739 - name : Build Release APK
40+ if : secrets.SIGNING_KEYSTORE != ''
3841 run : ./gradlew assembleRelease --stacktrace
3942
43+ - name : Build Debug APK
44+ if : secrets.SIGNING_KEYSTORE == ''
45+ run : ./gradlew assembleDebug --stacktrace
46+
4047 - name : Build App Bundle
48+ if : secrets.SIGNING_KEYSTORE != ''
4149 run : ./gradlew bundleRelease --stacktrace
4250
43- - name : Upload Release APK
51+ - name : Upload APK
4452 uses : actions/upload-artifact@v4
4553 with :
46- name : app-release.apk
47- path : app/build/outputs/apk/release/app-release.apk
54+ name : ${{ secrets.SIGNING_KEYSTORE != '' && ' app-release.apk' || 'app-debug.apk' }}
55+ path : ${{ secrets.SIGNING_KEYSTORE != '' && ' app/build/outputs/apk/release/app-release.apk' || 'app/build/outputs/apk/debug/app-debug.apk' }}
4856 if-no-files-found : error
4957 compression-level : 0
5058
5159 - name : Upload Release App Bundle
60+ if : secrets.SIGNING_KEYSTORE != ''
5261 uses : actions/upload-artifact@v4
5362 with :
5463 name : app-release.aab
5766 compression-level : 0
5867
5968 - name : Push APK to released repo
69+ if : secrets.RELEASED_REPO_TOKEN != ''
6070 run : |
6171 git config --global user.name "github-actions[bot]"
6272 git config --global user.email "github-actions[bot]@users.noreply.github.com"
0 commit comments