Skip to content

Commit 0c720d5

Browse files
committed
merge main
2 parents e91d5e4 + b8579b1 commit 0c720d5

File tree

222 files changed

+6729
-3122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+6729
-3122
lines changed

.github/workflows/createNewVersion.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,12 @@ jobs:
123123
# This is a workaround to allow pushes to a protected branch
124124
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
125125

126-
- name: Update submodule
126+
- name: Update submodule and checkout the main branch
127127
run: |
128128
git submodule update --init
129+
cd Mobile-Expensify
130+
git checkout main
131+
git pull origin main
129132
130133
- name: Setup git for OSBotify
131134
uses: ./.github/actions/composite/setupGitForOSBotify
@@ -177,10 +180,14 @@ jobs:
177180
./iOS/NotificationServiceExtension/Info.plist
178181
git commit -m "Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
179182
180-
- name: Update main branch
183+
- name: Update main branch on Mobile-Expensify and App
181184
run: |
182185
cd Mobile-Expensify
183186
git push origin main
187+
cd ..
188+
git add Mobile-Expensify
189+
git commit -m "Update Mobile-Expensify to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
190+
git push origin main
184191
185192
- name: Announce failed workflow in Slack
186193
if: ${{ failure() }}

.github/workflows/deploy.yml

+20-77
Original file line numberDiff line numberDiff line change
@@ -114,51 +114,6 @@ jobs:
114114
env:
115115
BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
116116

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-
162117
android_hybrid:
163118
name: Build and deploy Android HybridApp
164119
needs: prep
@@ -183,6 +138,11 @@ jobs:
183138
id: setup-node
184139
uses: ./.github/actions/composite/setupNode
185140

141+
- name: Run grunt build
142+
run: |
143+
cd Mobile-Expensify
144+
npm run grunt:build:shared
145+
186146
- name: Setup Java
187147
uses: actions/setup-java@v4
188148
with:
@@ -222,7 +182,7 @@ jobs:
222182

223183
- name: Get Android native version
224184
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"
226186

227187
- name: Build Android app
228188
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
@@ -239,10 +199,11 @@ jobs:
239199
VERSION: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
240200

241201
- name: Get current Android rollout percentage
202+
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
242203
id: getAndroidRolloutPercentage
243204
uses: ./.github/actions/javascript/getAndroidRolloutPercentage
244205
with:
245-
GOOGLE_KEY_FILE: Mobile-Expensify/react-native/android-fastlane-json-key.json
206+
GOOGLE_KEY_FILE: ./android-fastlane-json-key.json
246207
PACKAGE_NAME: org.me.mobiexpensifyg
247208

248209
- name: Submit production build for Google Play review and a slow rollout
@@ -424,12 +385,6 @@ jobs:
424385
APPLE_DEMO_EMAIL: ${{ secrets.APPLE_DEMO_EMAIL }}
425386
APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}
426387

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-
433388
- name: Upload iOS build to Browser Stack
434389
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
435390
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:
507462
uses: actions/cache@v4
508463
id: pods-cache
509464
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') }}
512467

513468
- name: Compare Podfile.lock and Manifest.lock
514469
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"
516471

517472
- name: Install cocoapods
518473
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
@@ -708,7 +663,7 @@ jobs:
708663
name: Post a Slack message when any platform fails to build or deploy
709664
runs-on: ubuntu-latest
710665
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]
712667
steps:
713668
- name: Checkout
714669
uses: actions/checkout@v4
@@ -723,21 +678,15 @@ jobs:
723678
outputs:
724679
IS_AT_LEAST_ONE_PLATFORM_DEPLOYED: ${{ steps.checkDeploymentSuccessOnAtLeastOnePlatform.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED }}
725680
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]
727682
if: ${{ always() }}
728683
steps:
729684
- name: Check deployment success on at least one platform
730685
id: checkDeploymentSuccessOnAtLeastOnePlatform
731686
run: |
732687
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"
741690
fi
742691
743692
if [ "${{ needs.iOS.result }}" == "success" ] || \
@@ -762,14 +711,8 @@ jobs:
762711
isAllPlatformsDeployed="true"
763712
fi
764713
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"
773716
fi
774717
775718
echo "IS_ALL_PLATFORMS_DEPLOYED=$isAllPlatformsDeployed" >> "$GITHUB_OUTPUT"
@@ -917,7 +860,7 @@ jobs:
917860
name: Post a Slack message when all platforms deploy successfully
918861
runs-on: ubuntu-latest
919862
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]
921864
steps:
922865
- name: 'Announces the deploy in the #announce Slack room'
923866
uses: 8398a7/action-slack@v3
@@ -971,11 +914,11 @@ jobs:
971914
postGithubComments:
972915
uses: ./.github/workflows/postDeployComments.yml
973916
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]
975918
with:
976919
version: ${{ needs.prep.outputs.APP_VERSION }}
977920
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 }}
979922
android_hybrid: ${{ needs.android_hybrid.result }}
980923
ios: ${{ needs.iOS.result }}
981924
ios_hybrid: ${{ needs.iOS_hybrid.result }}

.github/workflows/reassurePerformanceTests.yml

+18
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1618

1719
- name: Setup NodeJS
1820
uses: ./.github/actions/composite/setupNode
@@ -22,6 +24,22 @@ jobs:
2224
git config --global user.email "test@test.com"
2325
git config --global user.name "Test"
2426
27+
- name: Get common ancestor commit
28+
run: |
29+
git fetch origin main
30+
common_ancestor=$(git merge-base "${{ github.sha }}" origin/main)
31+
echo "COMMIT_HASH=$common_ancestor" >> "$GITHUB_ENV"
32+
33+
- name: Clean up deleted files
34+
run: |
35+
DELETED_FILES=$(git diff --name-only --diff-filter=D "$COMMIT_HASH" "${{ github.sha }}")
36+
for file in $DELETED_FILES; do
37+
if [ -n "$file" ]; then
38+
rm -f "$file"
39+
echo "Deleted file: $file"
40+
fi
41+
done
42+
2543
- name: Run performance testing script
2644
shell: bash
2745
run: |

.github/workflows/sendReassurePerfData.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
1517

1618
- name: Setup NodeJS
1719
uses: ./.github/actions/composite/setupNode

0 commit comments

Comments
 (0)