3535 java-version : 21
3636 - uses : gradle/actions/setup-gradle@v4
3737 - name : Decode keystore
38+ if : github.event_name != 'pull_request'
3839 run : echo "${{ secrets.RELEASE_KEYSTORE_FILE }}" | base64 --decode > android/release.keystore
3940 - name : Setup Android SDK
4041 uses : android-actions/setup-android@v3
@@ -43,14 +44,20 @@ jobs:
4344 - name : Install NDK
4445 run : sdkmanager "ndk;30.0.14904198"
4546 - name : Create local.properties
47+ if : github.event_name != 'pull_request'
4648 run : |
4749 cat <<EOF > android/local.properties
4850 RELEASE_STORE_FILE=../release.keystore
4951 RELEASE_STORE_PASSWORD=${{ secrets.RELEASE_STORE_PASSWORD }}
5052 RELEASE_KEY_ALIAS=${{ secrets.RELEASE_KEY_ALIAS }}
5153 RELEASE_KEY_PASSWORD=${{ secrets.RELEASE_KEY_PASSWORD }}
5254 EOF
53- - name : Build
55+ - name : Build debug APK for PRs
56+ if : github.event_name == 'pull_request'
57+ run : ./gradlew assembleFossDebug
58+ working-directory : android
59+ - name : Build release artifacts
60+ if : github.event_name != 'pull_request'
5461 run : ./gradlew packageReleaseArtifacts
5562 working-directory : android
5663 - name : Get app version
@@ -59,26 +66,37 @@ jobs:
5966 - id : vars
6067 run : echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
6168 - uses : actions/upload-artifact@v4
69+ if : github.event_name != 'pull_request'
6270 with :
6371 name : apk-release
6472 path : release/*release.apk
6573
6674 - uses : actions/upload-artifact@v4
75+ if : github.event_name == 'pull_request'
76+ with :
77+ name : apk-debug
78+ path : android/app/build/outputs/apk/foss/debug/app-foss-debug.apk
79+
80+ - uses : actions/upload-artifact@v4
81+ if : github.event_name != 'pull_request'
6782 with :
6883 name : apk-debug
6984 path : release/*debug.apk
7085
7186 - uses : actions/upload-artifact@v4
87+ if : github.event_name != 'pull_request'
7288 with :
7389 name : root-module-release
7490 path : release/*release.zip
7591
7692 - uses : actions/upload-artifact@v4
93+ if : github.event_name != 'pull_request'
7794 with :
7895 name : root-module-debug
7996 path : release/*debug.zip
8097
8198 - uses : actions/upload-artifact@v4
99+ if : github.event_name != 'pull_request'
82100 with :
83101 name : release-bundle
84102 path : release/*.aab
0 commit comments