@@ -114,51 +114,6 @@ jobs:
114
114
env :
115
115
BROWSERSTACK : ${{ secrets.BROWSERSTACK }}
116
116
117
- submitAndroid :
118
- name : Submit Android app for production review
119
- needs : prep
120
- if : ${{ github.ref == 'refs/heads/production' }}
121
- runs-on : ubuntu-latest
122
- steps :
123
- - name : Checkout
124
- uses : actions/checkout@v4
125
-
126
- - name : Setup Ruby
127
- uses : ruby/setup-ruby@v1.190.0
128
- with :
129
- bundler-cache : true
130
-
131
- - name : Get Android native version
132
- id : getAndroidVersion
133
- run : echo "VERSION_CODE=$(grep -o 'versionCode\s\+[0-9]\+' android/app/build.gradle | awk '{ print $2 }')" >> "$GITHUB_OUTPUT"
134
-
135
- - name : Decrypt json w/ Google Play credentials
136
- run : gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output android-fastlane-json-key.json android-fastlane-json-key.json.gpg
137
- working-directory : android/app
138
-
139
- - name : Submit Android build for review
140
- run : bundle exec fastlane android upload_google_play_production
141
- env :
142
- VERSION : ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
143
-
144
- - name : Warn deployers if Android production deploy failed
145
- if : ${{ failure() }}
146
- uses : 8398a7/action-slack@v3
147
- with :
148
- status : custom
149
- custom_payload : |
150
- {
151
- channel: '#deployer',
152
- attachments: [{
153
- color: "#DB4545",
154
- pretext: `<!subteam^S4TJJ3PSL>`,
155
- text: `💥 Android production deploy failed. Please manually submit ${{ needs.prep.outputs.APP_VERSION }} in the <https://play.google.com/console/u/0/developers/8765590895836334604/app/4973041797096886180/releases/overview|Google Play Store>. 💥`,
156
- }]
157
- }
158
- env :
159
- GITHUB_TOKEN : ${{ github.token }}
160
- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK }}
161
-
162
117
android_hybrid :
163
118
name : Build and deploy Android HybridApp
164
119
needs : prep
@@ -183,6 +138,11 @@ jobs:
183
138
id : setup-node
184
139
uses : ./.github/actions/composite/setupNode
185
140
141
+ - name : Run grunt build
142
+ run : |
143
+ cd Mobile-Expensify
144
+ npm run grunt:build:shared
145
+
186
146
- name : Setup Java
187
147
uses : actions/setup-java@v4
188
148
with :
@@ -222,7 +182,7 @@ jobs:
222
182
223
183
- name : Get Android native version
224
184
id : getAndroidVersion
225
- run : echo "VERSION_CODE=$(grep -oP 'android:versionCode="\K[0-9]+' .. /Android/AndroidManifest.xml)" >> "$GITHUB_OUTPUT"
185
+ run : echo "VERSION_CODE=$(grep -oP 'android:versionCode="\K[0-9]+' Mobile-Expensify /Android/AndroidManifest.xml)" >> "$GITHUB_OUTPUT"
226
186
227
187
- name : Build Android app
228
188
if : ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
@@ -239,10 +199,11 @@ jobs:
239
199
VERSION : ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
240
200
241
201
- name : Get current Android rollout percentage
202
+ if : ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
242
203
id : getAndroidRolloutPercentage
243
204
uses : ./.github/actions/javascript/getAndroidRolloutPercentage
244
205
with :
245
- GOOGLE_KEY_FILE : Mobile-Expensify/react-native /android-fastlane-json-key.json
206
+ GOOGLE_KEY_FILE : . /android-fastlane-json-key.json
246
207
PACKAGE_NAME : org.me.mobiexpensifyg
247
208
248
209
- name : Submit production build for Google Play review and a slow rollout
@@ -424,12 +385,6 @@ jobs:
424
385
APPLE_DEMO_EMAIL : ${{ secrets.APPLE_DEMO_EMAIL }}
425
386
APPLE_DEMO_PASSWORD : ${{ secrets.APPLE_DEMO_PASSWORD }}
426
387
427
- - name : Submit build for App Store review
428
- if : ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
429
- run : bundle exec fastlane ios submit_for_review
430
- env :
431
- VERSION : ${{ steps.getIOSVersion.outputs.IOS_VERSION }}
432
-
433
388
- name : Upload iOS build to Browser Stack
434
389
if : ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
435
390
run : curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/Users/runner/work/App/App/New Expensify.ipa"
@@ -507,12 +462,12 @@ jobs:
507
462
uses : actions/cache@v4
508
463
id : pods-cache
509
464
with :
510
- path : Mobile-Expensify/ios /Pods
511
- key : ${{ runner.os }}-pods-cache-${{ hashFiles('Mobile-Expensify/ios /Podfile.lock', 'firebase.json') }}
465
+ path : Mobile-Expensify/iOS /Pods
466
+ key : ${{ runner.os }}-pods-cache-${{ hashFiles('Mobile-Expensify/iOS /Podfile.lock', 'firebase.json') }}
512
467
513
468
- name : Compare Podfile.lock and Manifest.lock
514
469
id : compare-podfile-and-manifest
515
- run : echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('Mobile-Expensify/ios /Podfile.lock') == hashFiles('Mobile-Expensify/ios /Pods/Manifest.lock') }}" >> "$GITHUB_OUTPUT"
470
+ run : echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('Mobile-Expensify/iOS /Podfile.lock') == hashFiles('Mobile-Expensify/iOS /Pods/Manifest.lock') }}" >> "$GITHUB_OUTPUT"
516
471
517
472
- name : Install cocoapods
518
473
uses : nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
@@ -708,7 +663,7 @@ jobs:
708
663
name : Post a Slack message when any platform fails to build or deploy
709
664
runs-on : ubuntu-latest
710
665
if : ${{ failure() }}
711
- needs : [buildAndroid, uploadAndroid, submitAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web]
666
+ needs : [buildAndroid, uploadAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web]
712
667
steps :
713
668
- name : Checkout
714
669
uses : actions/checkout@v4
@@ -723,21 +678,15 @@ jobs:
723
678
outputs :
724
679
IS_AT_LEAST_ONE_PLATFORM_DEPLOYED : ${{ steps.checkDeploymentSuccessOnAtLeastOnePlatform.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED }}
725
680
IS_ALL_PLATFORMS_DEPLOYED : ${{ steps.checkDeploymentSuccessOnAllPlatforms.outputs.IS_ALL_PLATFORMS_DEPLOYED }}
726
- needs : [buildAndroid, uploadAndroid, submitAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web]
681
+ needs : [buildAndroid, uploadAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web]
727
682
if : ${{ always() }}
728
683
steps :
729
684
- name : Check deployment success on at least one platform
730
685
id : checkDeploymentSuccessOnAtLeastOnePlatform
731
686
run : |
732
687
isAtLeastOnePlatformDeployed="false"
733
- if [ ${{ github.ref }} == 'refs/heads/production' ]; then
734
- if [ "${{ needs.submitAndroid.result }}" == "success" ]; then
735
- isAtLeastOnePlatformDeployed="true"
736
- fi
737
- else
738
- if [ "${{ needs.uploadAndroid.result }}" == "success" ]; then
739
- isAtLeastOnePlatformDeployed="true"
740
- fi
688
+ if [ "${{ needs.uploadAndroid.result }}" == "success" ]; then
689
+ isAtLeastOnePlatformDeployed="true"
741
690
fi
742
691
743
692
if [ "${{ needs.iOS.result }}" == "success" ] || \
@@ -762,14 +711,8 @@ jobs:
762
711
isAllPlatformsDeployed="true"
763
712
fi
764
713
765
- if [ ${{ github.ref }} == 'refs/heads/production' ]; then
766
- if [ "${{ needs.submitAndroid.result }}" != "success" ]; then
767
- isAllPlatformsDeployed="false"
768
- fi
769
- else
770
- if [ "${{ needs.uploadAndroid.result }}" != "success" ]; then
771
- isAllPlatformsDeployed="false"
772
- fi
714
+ if [ "${{ needs.uploadAndroid.result }}" != "success" ]; then
715
+ isAllPlatformsDeployed="false"
773
716
fi
774
717
775
718
echo "IS_ALL_PLATFORMS_DEPLOYED=$isAllPlatformsDeployed" >> "$GITHUB_OUTPUT"
@@ -917,7 +860,7 @@ jobs:
917
860
name : Post a Slack message when all platforms deploy successfully
918
861
runs-on : ubuntu-latest
919
862
if : ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_ALL_PLATFORMS_DEPLOYED) }}
920
- needs : [prep, buildAndroid, uploadAndroid, submitAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web, checkDeploymentSuccess, createPrerelease, finalizeRelease]
863
+ needs : [prep, buildAndroid, uploadAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web, checkDeploymentSuccess, createPrerelease, finalizeRelease]
921
864
steps :
922
865
- name : ' Announces the deploy in the #announce Slack room'
923
866
uses : 8398a7/action-slack@v3
@@ -971,11 +914,11 @@ jobs:
971
914
postGithubComments :
972
915
uses : ./.github/workflows/postDeployComments.yml
973
916
if : ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }}
974
- needs : [prep, buildAndroid, uploadAndroid, submitAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web, checkDeploymentSuccess, createPrerelease, finalizeRelease]
917
+ needs : [prep, buildAndroid, uploadAndroid, android_hybrid, desktop, iOS, iOS_hybrid, web, checkDeploymentSuccess, createPrerelease, finalizeRelease]
975
918
with :
976
919
version : ${{ needs.prep.outputs.APP_VERSION }}
977
920
env : ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }}
978
- android : ${{ github.ref == 'refs/heads/production' && needs.submitAndroid.result || needs.uploadAndroid.result }}
921
+ android : ${{ github.ref == 'refs/heads/production' || needs.uploadAndroid.result }}
979
922
android_hybrid : ${{ needs.android_hybrid.result }}
980
923
ios : ${{ needs.iOS.result }}
981
924
ios_hybrid : ${{ needs.iOS_hybrid.result }}
0 commit comments