Skip to content

Commit 3b013b2

Browse files
authored
[cd] Split release workflow for 1.x.x and 2.x.x+ branches
1 parent e787000 commit 3b013b2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/Android-release CD.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)