@@ -55,17 +55,31 @@ jobs:
5555 echo '${{ secrets.SENTRY_PROPERTIES }}' > ./app/src/main/resources/sentry.properties
5656
5757 # Build AAB Release
58- - name : Build release Bundle
58+ - name : Build release Bundle (1.x.x)
5959 run : ./gradlew clean bundleRelease
60+ if : startsWith(github.ref, 'refs/heads/release/1.')
61+
62+ - name : Build prodRelease Bundle (2.x.x+)
63+ run : ./gradlew clean bundleProdRelease
64+ if : startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/heads/release/1.')
6065
6166 # Upload Google Play
62- - name : Deploy to Play Store 🚀
67+ - name : Deploy to Play Store 🚀 (1.x.x)
68+ uses : r0adkll/upload-google-play@v1
69+ with :
70+ serviceAccountJsonPlainText : ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
71+ packageName : ${{ secrets.AOS_PACKAGE_NAME }}
72+ releaseFiles : app/build/outputs/bundle/release/app-release.aab
73+ track : production
74+ status : draft
75+ if : startsWith(github.ref, 'refs/heads/release/1.')
76+
77+ - name : Deploy to Play Store 🚀 (2.0.0+)
6378 uses : r0adkll/upload-google-play@v1
6479 with :
6580 serviceAccountJsonPlainText : ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
66- packageName : ${{secrets.AOS_PACKAGE_NAME}}
67- releaseFiles : ./ app/build/outputs/bundle/release /app-release.aab
81+ packageName : ${{ secrets.AOS_PACKAGE_NAME }}
82+ releaseFiles : app/build/outputs/bundle/prodRelease /app-prod -release.aab
6883 track : production
6984 status : draft
70- if : github.ref != 'refs/heads/main'
71-
85+ if : startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/heads/release/1.')
0 commit comments