Skip to content

Commit 1da9530

Browse files
committed
chore: create an checkbox to upload the sourcemap in build mobile app workflow
1 parent eb832ce commit 1da9530

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
required: false
2424
type: string
2525
default: ''
26+
upload_to_sentry:
27+
description: 'If true, enable Sentry CLI upload of JS source maps and native debug symbols during the build'
28+
required: false
29+
type: boolean
30+
default: false
2631
workflow_dispatch:
2732
inputs:
2833
build_name:
@@ -50,6 +55,11 @@ on:
5055
required: false
5156
type: boolean
5257
default: false
58+
upload_to_sentry:
59+
description: 'Upload JS source maps and native debug symbols to Sentry during the build (requires Sentry auth in the build environment)'
60+
required: false
61+
type: boolean
62+
default: false
5363

5464
permissions:
5565
contents: read
@@ -313,6 +323,19 @@ jobs:
313323
cat ios/.xcode.env.local
314324
node --version
315325
326+
# Sentry: build.sh defaults SENTRY_DISABLE_AUTO_UPLOAD=true; set false only when opted in.
327+
- name: Configure Sentry upload
328+
env:
329+
UPLOAD_TO_SENTRY: ${{ inputs.upload_to_sentry }}
330+
run: |
331+
if [ "$UPLOAD_TO_SENTRY" = "true" ]; then
332+
echo "SENTRY_DISABLE_AUTO_UPLOAD=false" >> "$GITHUB_ENV"
333+
echo "✅ Sentry auto-upload enabled for this build"
334+
else
335+
echo "SENTRY_DISABLE_AUTO_UPLOAD=true" >> "$GITHUB_ENV"
336+
echo "ℹ️ Sentry auto-upload disabled"
337+
fi
338+
316339
# Build with retry logic. Timeouts: 55min per attempt, 115min total for step, 120min job
317340
- name: Build ${{ matrix.platform }}
318341
timeout-minutes: 115

0 commit comments

Comments
 (0)