Skip to content

Commit 50665ca

Browse files
committed
merge main
2 parents 95e0afc + 241d30f commit 50665ca

308 files changed

Lines changed: 8360 additions & 5822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Upload build to Sentry for size analysis
2+
description: |
3+
Download a platform binary and upload it to Sentry for size analysis. The binary is sourced
4+
from either the current workflow run's artifacts (cherry-pick prod deploys, which build natively)
5+
or the matching staging GitHub Release (re-promotion prod deploys, which do not build natively).
6+
7+
inputs:
8+
platform:
9+
description: "Platform label used in the GH Actions notice (e.g. 'Android' or 'iOS')"
10+
required: true
11+
asset-name:
12+
description: "Filename of the binary on disk and as the GH Release asset (e.g. 'Expensify-release.aab')"
13+
required: true
14+
artifact-name:
15+
description: "Name of the GH Actions artifact to download for cherry-pick deploys (e.g. 'androidBuild-artifact')"
16+
required: true
17+
staging-release-tag:
18+
description: "Tag of the staging GH Release to download from for re-promotion deploys (e.g. '9.4.13-0-staging')"
19+
required: true
20+
is-cherry-pick:
21+
description: "'true' when this deploy is a cherry-pick (binary is in the current run); 'false' otherwise (binary is on the staging release)"
22+
required: true
23+
24+
outputs:
25+
SENTRY_URL:
26+
description: URL to the Sentry size analysis for the uploaded build (empty if upload failed or quota exhausted)
27+
value: ${{ steps.upload.outputs.SENTRY_URL }}
28+
29+
runs:
30+
using: composite
31+
steps:
32+
- name: Setup Node
33+
uses: ./.github/actions/composite/setupNode
34+
35+
- name: Download binary from current workflow run (cherry-pick path)
36+
if: ${{ inputs.is-cherry-pick == 'true' }}
37+
continue-on-error: true
38+
# v7
39+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
40+
with:
41+
name: ${{ inputs.artifact-name }}
42+
path: ./
43+
44+
- name: Download binary from the staging GitHub Release (re-promotion path)
45+
if: ${{ inputs.is-cherry-pick != 'true' }}
46+
continue-on-error: true
47+
shell: bash
48+
env:
49+
TAG: ${{ inputs.staging-release-tag }}
50+
ASSET: ${{ inputs.asset-name }}
51+
run: |
52+
gh release download "$TAG" --pattern "$ASSET" --output "$ASSET"
53+
[ -s "$ASSET" ] || { echo "::error::Failed to obtain $ASSET from $TAG"; exit 1; }
54+
55+
- name: Upload to Sentry
56+
id: upload
57+
if: ${{ hashFiles(inputs.asset-name) != '' }}
58+
continue-on-error: true
59+
shell: bash
60+
env:
61+
ASSET: ${{ inputs.asset-name }}
62+
PLATFORM: ${{ inputs.platform }}
63+
run: |
64+
OUTPUT=$(npx sentry-cli build upload "$ASSET" \
65+
--org expensify --project app --build-configuration Release --log-level info 2>&1)
66+
echo "$OUTPUT"
67+
SENTRY_URL=$(echo "$OUTPUT" | grep -oE 'https://expensify\.sentry\.io/[^ )"}]+' | head -1)
68+
if [ -n "$SENTRY_URL" ]; then
69+
echo "::notice::${PLATFORM} Sentry size analysis: $SENTRY_URL"
70+
echo "SENTRY_URL=$SENTRY_URL" >> "$GITHUB_OUTPUT"
71+
fi

.github/workflows/buildAndroid.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ 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 }}
4138
AAB_FILENAME:
4239
description: Filename of the AAB artifact (empty if no AAB was produced)
4340
value: ${{ jobs.build.outputs.AAB_FILENAME }}
@@ -60,7 +57,6 @@ jobs:
6057
outputs:
6158
VERSION_CODE: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }}
6259
ROCK_ARTIFACT_URL: ${{ steps.set-artifact-url.outputs.ARTIFACT_URL }}
63-
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
6460
AAB_FILENAME: ${{ steps.collectArtifacts.outputs.AAB_FILENAME }}
6561
APK_FILENAME: ${{ steps.collectArtifacts.outputs.APK_FILENAME }}
6662
SOURCEMAP_FILENAME: index.android.bundle.map
@@ -195,22 +191,6 @@ jobs:
195191
if: ${{ inputs.variant == 'Adhoc' }}
196192
run: echo "ARTIFACT_URL=$ARTIFACT_URL" >> "$GITHUB_OUTPUT"
197193

198-
- name: Upload Android build to Sentry for size analysis
199-
id: sentry-upload
200-
if: ${{ inputs.variant == 'Release' && env.ARTIFACT_PATH != '' }}
201-
continue-on-error: true
202-
timeout-minutes: 5
203-
run: |
204-
OUTPUT=$(npx sentry-cli build upload "$ARTIFACT_PATH" --org expensify --project app --build-configuration Release --log-level debug 2>&1)
205-
echo "$OUTPUT"
206-
SENTRY_URL=$(echo "$OUTPUT" | grep -oE 'https://expensify\.sentry\.io/[^ "}]+' | head -1)
207-
if [ -n "$SENTRY_URL" ]; then
208-
echo "::notice::Android Sentry size analysis: $SENTRY_URL"
209-
echo "SENTRY_URL=$SENTRY_URL" >> "$GITHUB_OUTPUT"
210-
fi
211-
env:
212-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
213-
214194
- name: Upload Gradle profile report
215195
if: always()
216196
# v6

.github/workflows/buildIOS.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ 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 }}
4138
IPA_FILENAME:
4239
description: Filename of the IPA artifact produced by the build
4340
value: ${{ jobs.build.outputs.IPA_FILENAME }}
@@ -58,7 +55,6 @@ jobs:
5855
outputs:
5956
IOS_VERSION: ${{ steps.getIOSVersion.outputs.IOS_VERSION }}
6057
ROCK_ARTIFACT_URL: ${{ steps.set-artifact-url.outputs.ARTIFACT_URL }}
61-
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
6258
IPA_FILENAME: ${{ steps.set-ipa-filename.outputs.IPA_FILENAME }}
6359
DSYM_FILENAME: ${{ steps.set-ipa-filename.outputs.DSYM_FILENAME }}
6460
SOURCEMAP_FILENAME: main.jsbundle.map
@@ -244,22 +240,6 @@ jobs:
244240
comment-bot: false
245241
custom-identifier: ${{ steps.computeIdentifier.outputs.IDENTIFIER }}
246242

247-
- name: Upload iOS build to Sentry for size analysis
248-
id: sentry-upload
249-
if: ${{ inputs.variant == 'Release' && env.ARTIFACT_PATH != '' }}
250-
continue-on-error: true
251-
timeout-minutes: 5
252-
run: |
253-
OUTPUT=$(npx sentry-cli build upload "$ARTIFACT_PATH" --org expensify --project app --build-configuration Release --log-level debug 2>&1)
254-
echo "$OUTPUT"
255-
SENTRY_URL=$(echo "$OUTPUT" | grep -oE 'https://expensify\.sentry\.io/[^ "}]+' | head -1)
256-
if [ -n "$SENTRY_URL" ]; then
257-
echo "::notice::iOS Sentry size analysis: $SENTRY_URL"
258-
echo "SENTRY_URL=$SENTRY_URL" >> "$GITHUB_OUTPUT"
259-
fi
260-
env:
261-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
262-
263243
- name: Set artifact URL output
264244
id: set-artifact-url
265245
if: ${{ inputs.variant == 'Adhoc' }}

.github/workflows/deploy.yml

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,68 @@ jobs:
999999
}]
10001000
}
10011001
1002+
# Upload the production-bound binary to Sentry for size analysis.
1003+
# - Cherry-pick deploys build native in this run, so we pull the .aab/.ipa from the build artifact.
1004+
# - Re-promotion deploys don't build native, so we download from the matching `<TAG>-staging`
1005+
# GitHub Release populated during the staging deploy of that version.
1006+
androidUploadSentry:
1007+
name: Upload Android build to Sentry for size analysis
1008+
needs: [prep, androidBuild, checkDeploymentSuccess]
1009+
runs-on: blacksmith-2vcpu-ubuntu-2404
1010+
if: >-
1011+
${{ always()
1012+
&& needs.prep.outputs.DEPLOY_ENV == 'production'
1013+
&& fromJSON(needs.checkDeploymentSuccess.outputs.IS_RELEASE_READY) }}
1014+
continue-on-error: true
1015+
timeout-minutes: 10
1016+
outputs:
1017+
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
1018+
steps:
1019+
- name: Checkout
1020+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
1021+
1022+
- name: Upload to Sentry for size analysis
1023+
id: sentry-upload
1024+
uses: ./.github/actions/composite/uploadSentrySizeAnalysis
1025+
env:
1026+
GH_TOKEN: ${{ github.token }}
1027+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1028+
with:
1029+
platform: Android
1030+
asset-name: Expensify-release.aab
1031+
artifact-name: androidBuild-artifact
1032+
staging-release-tag: ${{ needs.prep.outputs.TAG }}-staging
1033+
is-cherry-pick: ${{ needs.prep.outputs.IS_CHERRY_PICK }}
1034+
1035+
iosUploadSentry:
1036+
name: Upload iOS build to Sentry for size analysis
1037+
needs: [prep, iosBuild, checkDeploymentSuccess]
1038+
runs-on: blacksmith-2vcpu-ubuntu-2404
1039+
if: >-
1040+
${{ always()
1041+
&& needs.prep.outputs.DEPLOY_ENV == 'production'
1042+
&& fromJSON(needs.checkDeploymentSuccess.outputs.IS_RELEASE_READY) }}
1043+
continue-on-error: true
1044+
timeout-minutes: 10
1045+
outputs:
1046+
SENTRY_URL: ${{ steps.sentry-upload.outputs.SENTRY_URL }}
1047+
steps:
1048+
- name: Checkout
1049+
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
1050+
1051+
- name: Upload to Sentry for size analysis
1052+
id: sentry-upload
1053+
uses: ./.github/actions/composite/uploadSentrySizeAnalysis
1054+
env:
1055+
GH_TOKEN: ${{ github.token }}
1056+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1057+
with:
1058+
platform: iOS
1059+
asset-name: Expensify.ipa
1060+
artifact-name: iosBuild-artifact
1061+
staging-release-tag: ${{ needs.prep.outputs.TAG }}-staging
1062+
is-cherry-pick: ${{ needs.prep.outputs.IS_CHERRY_PICK }}
1063+
10021064
# Why is this necessary for CP-to-prod? Consider this scenario:
10031065
# 1. You close a checklist and we create a new staging version `9.0.34-0` and a new checklist
10041066
# 2. You then CP a PR to production, and in the process create `9.0.35-0`
@@ -1068,13 +1130,13 @@ jobs:
10681130
postGithubComments:
10691131
uses: ./.github/workflows/postDeployComments.yml
10701132
if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_RELEASE_READY) }}
1071-
needs: [prep, checkDeploymentSuccess, createRelease, androidBuild, iosBuild]
1133+
needs: [prep, checkDeploymentSuccess, createRelease, androidBuild, iosBuild, androidUploadSentry, iosUploadSentry]
10721134
secrets: inherit
10731135
with:
10741136
version: ${{ needs.prep.outputs.APP_VERSION }}
10751137
env: ${{ needs.prep.outputs.DEPLOY_ENV }}
10761138
android: ${{ needs.checkDeploymentSuccess.outputs.ANDROID_RESULT }}
10771139
ios: ${{ needs.checkDeploymentSuccess.outputs.IOS_RESULT }}
10781140
web: ${{ needs.checkDeploymentSuccess.outputs.WEB_RESULT }}
1079-
android_sentry_url: ${{ needs.androidBuild.outputs.SENTRY_URL }}
1080-
ios_sentry_url: ${{ needs.iosBuild.outputs.SENTRY_URL }}
1141+
android_sentry_url: ${{ needs.androidUploadSentry.outputs.SENTRY_URL }}
1142+
ios_sentry_url: ${{ needs.iosUploadSentry.outputs.SENTRY_URL }}

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ android {
111111
minSdkVersion rootProject.ext.minSdkVersion
112112
targetSdkVersion rootProject.ext.targetSdkVersion
113113
multiDexEnabled rootProject.ext.multiDexEnabled
114-
versionCode 1009041901
115-
versionName "9.4.19-1"
114+
versionCode 1009042000
115+
versionName "9.4.20-0"
116116
// Supported language variants must be declared here to avoid from being removed during the compilation.
117117
// This also helps us to not include unnecessary language variants in the APK.
118118
resConfigs "en", "es"

0 commit comments

Comments
 (0)