Skip to content

Commit 6599483

Browse files
authored
Merge branch 'Expensify:main' into hotfix-fab-1
2 parents 4dfad75 + efdf88c commit 6599483

60 files changed

Lines changed: 1089 additions & 130 deletions

Some content is hidden

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

.github/actions/javascript/markPullRequestsAsDeployed/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ inputs:
3232
NOTE:
3333
description: "Additional note from the deployer"
3434
required: false
35+
ANDROID_SENTRY_URL:
36+
description: "URL to Sentry size analysis for Android"
37+
required: false
38+
IOS_SENTRY_URL:
39+
description: "URL to Sentry size analysis for iOS"
40+
required: false
3541
runs:
3642
using: "node20"
3743
main: "./index.js"

.github/actions/javascript/markPullRequestsAsDeployed/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12844,6 +12844,8 @@ async function run() {
1284412844
const webResult = getDeployTableMessage(core.getInput('WEB', { required: true }));
1284512845
const date = core.getInput('DATE');
1284612846
const note = core.getInput('NOTE');
12847+
const androidSentryUrl = core.getInput('ANDROID_SENTRY_URL');
12848+
const iosSentryUrl = core.getInput('IOS_SENTRY_URL');
1284712849
function getDeployMessage(deployer, deployVerb) {
1284812850
let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`;
1284912851
message += ` by https://github.com/${deployer} in version: ${version} `;
@@ -12857,6 +12859,15 @@ async function run() {
1285712859
if (note) {
1285812860
message += `\n\n_Note:_ ${note}`;
1285912861
}
12862+
if (androidSentryUrl || iosSentryUrl) {
12863+
message += `\n\n**Bundle Size Analysis (Sentry):**`;
12864+
if (androidSentryUrl) {
12865+
message += `\n- [Android](${androidSentryUrl})`;
12866+
}
12867+
if (iosSentryUrl) {
12868+
message += `\n- [iOS](${iosSentryUrl})`;
12869+
}
12870+
}
1286012871
return message;
1286112872
}
1286212873
if (isProd) {

.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ async function run() {
108108

109109
const date = core.getInput('DATE');
110110
const note = core.getInput('NOTE');
111+
const androidSentryUrl = core.getInput('ANDROID_SENTRY_URL');
112+
const iosSentryUrl = core.getInput('IOS_SENTRY_URL');
111113

112114
function getDeployMessage(deployer: string, deployVerb: string): string {
113115
let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`;
@@ -124,6 +126,16 @@ async function run() {
124126
message += `\n\n_Note:_ ${note}`;
125127
}
126128

129+
if (androidSentryUrl || iosSentryUrl) {
130+
message += `\n\n**Bundle Size Analysis (Sentry):**`;
131+
if (androidSentryUrl) {
132+
message += `\n- [Android](${androidSentryUrl})`;
133+
}
134+
if (iosSentryUrl) {
135+
message += `\n- [iOS](${iosSentryUrl})`;
136+
}
137+
}
138+
127139
return message;
128140
}
129141

.github/workflows/buildAndroid.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ on:
3535
ROCK_ARTIFACT_URL:
3636
description: URL to download the ad-hoc build artifact (adhoc only)
3737
value: ${{ jobs.build.outputs.ROCK_ARTIFACT_URL }}
38+
SENTRY_URL:
39+
description: URL to Sentry size analysis
40+
value: ${{ jobs.build.outputs.SENTRY_URL }}
3841
AAB_FILENAME:
3942
description: Filename of the AAB artifact (empty if no AAB was produced)
4043
value: ${{ jobs.build.outputs.AAB_FILENAME }}
@@ -57,6 +60,7 @@ jobs:
5760
outputs:
5861
VERSION_CODE: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
5962
ROCK_ARTIFACT_URL: ${{ steps.set-artifact-url.outputs.ARTIFACT_URL }}
63+
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
6064
AAB_FILENAME: ${{ steps.collectArtifacts.outputs.AAB_FILENAME }}
6165
APK_FILENAME: ${{ steps.collectArtifacts.outputs.APK_FILENAME }}
6266
SOURCEMAP_FILENAME: index.android.bundle.map
@@ -185,6 +189,27 @@ jobs:
185189
custom-identifier: ${{ steps.computeIdentifier.outputs.IDENTIFIER }}
186190
validate-elf-alignment: ${{ inputs.variant != 'Release' && 'true' || 'false' }}
187191

192+
- name: Set artifact URL output
193+
id: set-artifact-url
194+
if: ${{ inputs.variant == 'Adhoc' }}
195+
run: echo "ARTIFACT_URL=$ARTIFACT_URL" >> "$GITHUB_OUTPUT"
196+
197+
- name: Upload Android build to Sentry for size analysis
198+
id: sentry-upload
199+
if: ${{ inputs.variant == 'Release' && env.ARTIFACT_PATH != '' }}
200+
continue-on-error: true
201+
timeout-minutes: 5
202+
run: |
203+
OUTPUT=$(npx sentry-cli build upload "$ARTIFACT_PATH" --org expensify --project app --build-configuration Release --log-level debug 2>&1)
204+
echo "$OUTPUT"
205+
SENTRY_URL=$(echo "$OUTPUT" | grep -oE 'https://expensify\.sentry\.io/[^ ]+' | head -1)
206+
if [ -n "$SENTRY_URL" ]; then
207+
echo "::notice::Android Sentry size analysis: $SENTRY_URL"
208+
echo "SENTRY_URL=$SENTRY_URL" >> "$GITHUB_OUTPUT"
209+
fi
210+
env:
211+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
212+
188213
- name: Upload Gradle profile report
189214
if: always()
190215
# v6
@@ -194,11 +219,6 @@ jobs:
194219
path: Mobile-Expensify/Android/build/reports/profile/
195220
if-no-files-found: ignore
196221

197-
- name: Set artifact URL output
198-
id: set-artifact-url
199-
if: ${{ inputs.variant == 'Adhoc' }}
200-
run: echo "ARTIFACT_URL=$ARTIFACT_URL" >> "$GITHUB_OUTPUT"
201-
202222
- name: Collect build artifacts
203223
id: collectArtifacts
204224
run: |
@@ -294,3 +314,4 @@ jobs:
294314
with:
295315
name: ${{ inputs.artifact-prefix }}android-apk-artifact
296316
path: Expensify.apk
317+

.github/workflows/buildIOS.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ on:
3535
ROCK_ARTIFACT_URL:
3636
description: URL to download the ad-hoc build artifact (adhoc only)
3737
value: ${{ jobs.build.outputs.ROCK_ARTIFACT_URL }}
38+
SENTRY_URL:
39+
description: URL to Sentry size analysis
40+
value: ${{ jobs.build.outputs.SENTRY_URL }}
3841
IPA_FILENAME:
3942
description: Filename of the IPA artifact produced by the build
4043
value: ${{ jobs.build.outputs.IPA_FILENAME }}
@@ -55,6 +58,7 @@ jobs:
5558
outputs:
5659
IOS_VERSION: ${{ steps.getIOSVersion.outputs.IOS_VERSION }}
5760
ROCK_ARTIFACT_URL: ${{ steps.set-artifact-url.outputs.ARTIFACT_URL }}
61+
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
5862
IPA_FILENAME: ${{ steps.set-ipa-filename.outputs.IPA_FILENAME }}
5963
DSYM_FILENAME: ${{ steps.set-ipa-filename.outputs.DSYM_FILENAME }}
6064
SOURCEMAP_FILENAME: main.jsbundle.map
@@ -241,6 +245,22 @@ jobs:
241245
comment-bot: false
242246
custom-identifier: ${{ steps.computeIdentifier.outputs.IDENTIFIER }}
243247

248+
- name: Upload iOS build to Sentry for size analysis
249+
id: sentry-upload
250+
if: ${{ inputs.variant == 'Release' && env.ARTIFACT_PATH != '' }}
251+
continue-on-error: true
252+
timeout-minutes: 5
253+
run: |
254+
OUTPUT=$(npx sentry-cli build upload "$ARTIFACT_PATH" --org expensify --project app --build-configuration Release --log-level debug 2>&1)
255+
echo "$OUTPUT"
256+
SENTRY_URL=$(echo "$OUTPUT" | grep -oE 'https://expensify\.sentry\.io/[^ ]+' | head -1)
257+
if [ -n "$SENTRY_URL" ]; then
258+
echo "::notice::iOS Sentry size analysis: $SENTRY_URL"
259+
echo "SENTRY_URL=$SENTRY_URL" >> "$GITHUB_OUTPUT"
260+
fi
261+
env:
262+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
263+
244264
- name: Set artifact URL output
245265
id: set-artifact-url
246266
if: ${{ inputs.variant == 'Adhoc' }}
@@ -304,3 +324,4 @@ jobs:
304324
with:
305325
name: ${{ inputs.artifact-prefix }}ios-sourcemap-artifact
306326
path: Mobile-Expensify/main.jsbundle.map
327+

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,11 +912,13 @@ jobs:
912912
postGithubComments:
913913
uses: ./.github/workflows/postDeployComments.yml
914914
if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }}
915-
needs: [prep, checkDeploymentSuccess, createRelease]
915+
needs: [prep, checkDeploymentSuccess, createRelease, androidBuild, iosBuild]
916916
secrets: inherit
917917
with:
918918
version: ${{ needs.prep.outputs.APP_VERSION }}
919919
env: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }}
920920
android: ${{ needs.checkDeploymentSuccess.outputs.ANDROID_RESULT }}
921921
ios: ${{ needs.checkDeploymentSuccess.outputs.IOS_RESULT }}
922922
web: ${{ needs.checkDeploymentSuccess.outputs.WEB_RESULT }}
923+
android_sentry_url: ${{ needs.androidBuild.outputs.SENTRY_URL }}
924+
ios_sentry_url: ${{ needs.iosBuild.outputs.SENTRY_URL }}

.github/workflows/postDeployComments.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ on:
2323
description: Web deploy status
2424
required: true
2525
type: string
26+
android_sentry_url:
27+
description: URL to Sentry size analysis for Android
28+
required: false
29+
type: string
30+
ios_sentry_url:
31+
description: URL to Sentry size analysis for iOS
32+
required: false
33+
type: string
2634
secrets:
2735
OS_BOTIFY_TOKEN:
2836
description: Token for accessing Mobile-Expensify repository
@@ -109,3 +117,5 @@ jobs:
109117
WEB: ${{ inputs.web }}
110118
DATE: ${{ inputs.date }}
111119
NOTE: ${{ inputs.note }}
120+
ANDROID_SENTRY_URL: ${{ inputs.android_sentry_url }}
121+
IOS_SENTRY_URL: ${{ inputs.ios_sentry_url }}

0 commit comments

Comments
 (0)