Skip to content

Commit f78b07b

Browse files
Merge branch 'main' into @adamgrzybowski/fix-recently-added-bugs
2 parents ee566e4 + 1a0d813 commit f78b07b

585 files changed

Lines changed: 17347 additions & 10861 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/buildAdHoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
owner: context.repo.owner,
5555
repo: context.repo.repo,
5656
issue_number: ${{ inputs.APP_PR_NUMBER || 0 }},
57-
body: `🚧 @${{ github.actor }} has triggered a test Expensify/App build. You can view the [workflow run here](${workflowURL}).`
57+
body: `🚧 ${{ github.actor }} has triggered a test Expensify/App build. You can view the [workflow run here](${workflowURL}).`
5858
});
5959
6060
- name: Add build start comment to Expensify/Mobile-Expensify PR
@@ -69,7 +69,7 @@ jobs:
6969
owner: context.repo.owner,
7070
repo: 'Mobile-Expensify',
7171
issue_number: ${{ inputs.MOBILE_EXPENSIFY_PR || 0 }},
72-
body: `🚧 @${{ github.actor }} has triggered a test Expensify/Mobile-Expensify build. You can view the [workflow run here](${workflowURL}).`
72+
body: `🚧 ${{ github.actor }} has triggered a test Expensify/Mobile-Expensify build. You can view the [workflow run here](${workflowURL}).`
7373
});
7474
7575
buildAndroid:

.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: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ jobs:
533533
- name: Submit previous production build to 100%
534534
run: bundle exec fastlane ios complete_hybrid_rollout
535535
continue-on-error: true
536+
env:
537+
APPLE_ID: ${{ vars.APPLE_ID }}
536538

537539
- name: Submit production build for App Store review and a slow rollout
538540
run: bundle exec fastlane ios submit_hybrid_for_rollout
@@ -997,6 +999,68 @@ jobs:
997999
}]
9981000
}
9991001
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+
10001064
# Why is this necessary for CP-to-prod? Consider this scenario:
10011065
# 1. You close a checklist and we create a new staging version `9.0.34-0` and a new checklist
10021066
# 2. You then CP a PR to production, and in the process create `9.0.35-0`
@@ -1066,13 +1130,13 @@ jobs:
10661130
postGithubComments:
10671131
uses: ./.github/workflows/postDeployComments.yml
10681132
if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_RELEASE_READY) }}
1069-
needs: [prep, checkDeploymentSuccess, createRelease, androidBuild, iosBuild]
1133+
needs: [prep, checkDeploymentSuccess, createRelease, androidBuild, iosBuild, androidUploadSentry, iosUploadSentry]
10701134
secrets: inherit
10711135
with:
10721136
version: ${{ needs.prep.outputs.APP_VERSION }}
10731137
env: ${{ needs.prep.outputs.DEPLOY_ENV }}
10741138
android: ${{ needs.checkDeploymentSuccess.outputs.ANDROID_RESULT }}
10751139
ios: ${{ needs.checkDeploymentSuccess.outputs.IOS_RESULT }}
10761140
web: ${{ needs.checkDeploymentSuccess.outputs.WEB_RESULT }}
1077-
android_sentry_url: ${{ needs.androidBuild.outputs.SENTRY_URL }}
1078-
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 }}

.github/workflows/validateMobileExpensifySubmodule.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
repository: Expensify/Mobile-Expensify
2222
path: .github/mobile-expensify-repo
2323
token: ${{ secrets.OS_BOTIFY_TOKEN }}
24+
# We only read the default-branch HEAD SHA (git rev-parse HEAD), never file contents,
25+
# so skip downloading blobs and check out only the repo root to avoid materializing the tree.
26+
filter: blob:none
27+
sparse-checkout: .
28+
sparse-checkout-cone-mode: false
2429

2530
- name: Validate submodule pointer
2631
env:

.storybook/fonts.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,56 @@
22
font-family: Expensify Neue;
33
font-weight: 400;
44
font-style: normal;
5-
src: url('../assets/fonts/web/ExpensifyNeue-Regular.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Regular.woff') format('woff');
5+
src: url('../assets/fonts/web/ExpensifyNeue-Regular.woff2') format('woff2');
66
}
77

88
@font-face {
99
font-family: Expensify Neue;
1010
font-weight: 700;
1111
font-style: normal;
12-
src: url('../assets/fonts/web/ExpensifyNeue-Bold.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Bold.woff') format('woff');
12+
src: url('../assets/fonts/web/ExpensifyNeue-Bold.woff2') format('woff2');
1313
}
1414

1515
@font-face {
1616
font-family: Expensify Neue;
1717
font-weight: 400;
1818
font-style: italic;
19-
src: url('../assets/fonts/web/ExpensifyNeue-Italic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-Italic.woff') format('woff');
19+
src: url('../assets/fonts/web/ExpensifyNeue-Italic.woff2') format('woff2');
2020
}
2121

2222
@font-face {
2323
font-family: Expensify Neue;
2424
font-weight: 700;
2525
font-style: italic;
26-
src: url('../assets/fonts/web/ExpensifyNeue-BoldItalic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNeue-BoldItalic.woff') format('woff');
26+
src: url('../assets/fonts/web/ExpensifyNeue-BoldItalic.woff2') format('woff2');
2727
}
2828

2929
@font-face {
3030
font-family: Expensify Mono;
3131
font-weight: 400;
3232
font-style: normal;
33-
src: url('../assets/fonts/web/ExpensifyMono-Regular.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyMono-Regular.woff') format('woff');
33+
src: url('../assets/fonts/web/ExpensifyMono-Regular.woff2') format('woff2');
3434
}
3535

3636
@font-face {
3737
font-family: Expensify Mono;
3838
font-weight: 700;
3939
font-style: normal;
40-
src: url('../assets/fonts/web/ExpensifyMono-Bold.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyMono-Bold.woff') format('woff');
40+
src: url('../assets/fonts/web/ExpensifyMono-Bold.woff2') format('woff2');
4141
}
4242

4343
@font-face {
4444
font-family: Expensify New Kansas;
4545
font-weight: 500;
4646
font-style: normal;
47-
src: url('../assets/fonts/web/ExpensifyNewKansas-Medium.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNewKansas-Medium.woff') format('woff');
47+
src: url('../assets/fonts/web/ExpensifyNewKansas-Medium.woff2') format('woff2');
4848
}
4949

5050
@font-face {
5151
font-family: Expensify New Kansas;
5252
font-weight: 500;
5353
font-style: italic;
54-
src: url('../assets/fonts/web/ExpensifyNewKansas-MediumItalic.woff2') format('woff2'), url('../assets/fonts/web/ExpensifyNewKansas-MediumItalic.woff') format('woff');
54+
src: url('../assets/fonts/web/ExpensifyNewKansas-MediumItalic.woff2') format('woff2');
5555
}
5656

5757
* {

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 1009041700
115-
versionName "9.4.17-0"
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"

assets/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Fonts
44

5-
All fonts used by web and native apps are located inside `assets/fonts/` folder. The native app will use fonts with `.otf` or `.ttf` formats, where the web app will use fonts with `.otf`, `.ttf`, `.woff` or `.woff2` formats.
5+
All fonts used by web and native apps are located inside `assets/fonts/` folder. The native app will use fonts with `.otf` or `.ttf` formats, where the web app will use fonts with `.otf`, `.ttf` or `.woff2` formats.
66

77
### Adding / Removing fonts
88

@@ -77,7 +77,7 @@ To add or remove a font used in the web app:
7777
font-family: <new_font_family>;
7878
font-weight: 500;
7979
font-style: normal;
80-
src: url('/fonts/<font-family-file>.woff2') format('woff2'), url('/fonts/<font-family-file>.woff') format('woff');
80+
src: url('/fonts/<font-family-file>.woff2') format('woff2');
8181
}
8282
/* Add the other variants too. */
8383
```
@@ -100,7 +100,7 @@ To add or remove a font used in the storybook web app:
100100
font-family: <new_font_family>;
101101
font-weight: 500;
102102
font-style: normal;
103-
src: url('../assets/fonts/web/<font-family-file>.woff2') format('woff2'), url('../assets/fonts/web/<font-family-file>.woff') format('woff');
103+
src: url('../assets/fonts/web/<font-family-file>.woff2') format('woff2');
104104
}
105105
/* Add the other variants too. */
106106
```
@@ -121,7 +121,7 @@ To add or remove a font used in the Expensify Help web app:
121121
font-family: <new_font_family>;
122122
font-weight: 500;
123123
font-style: normal;
124-
src: url('/assets/fonts/<font-family-file>.woff2') format('woff2'), url('/assets/fonts/<font-family-file>.woff') format('woff');
124+
src: url('/assets/fonts/<font-family-file>.woff2') format('woff2');
125125
}
126126
/* Add the other variants too. */
127127
```

0 commit comments

Comments
 (0)