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 }}
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+
0 commit comments