From 9ada5f6748b801b491e65a8ec0de039e53d3c448 Mon Sep 17 00:00:00 2001 From: wcjord <32568597+wcjord@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:12:58 -0500 Subject: [PATCH] fix: upload Sentry source maps correctly for both staging and production (#5763) - Remove SENTRY_RELEASE override in staging that caused a release tag mismatch (commit SHA vs pubspec version). The sentry_dart_plugin now auto-detects the same release name the SDK sends at runtime. - Add update_sentry job to production release workflow (was missing entirely). - Hardcode SENTRY_ORG and SENTRY_PROJECT since they were never set as GitHub environment variables, causing silent upload failures. --- .github/workflows/main_deploy.yaml | 5 ++--- .github/workflows/release.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index dad9f5972..f142ef2ee 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -76,9 +76,8 @@ jobs: environment: staging env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_RELEASE: ${{ github.sha }} - SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} - SENTRY_ORG: ${{ vars.SENTRY_ORG }} + SENTRY_PROJECT: client + SENTRY_ORG: pangea-chat steps: - uses: actions/checkout@v6 - run: cat .github/workflows/versions.env >> $GITHUB_ENV diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e9c6e7dd9..579a865b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -198,3 +198,27 @@ jobs: - name: AWS CloudFront Invalidation run: | aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths "/*" + + update_sentry: + runs-on: ubuntu-latest + needs: build_web + environment: production + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_PROJECT: client + SENTRY_ORG: pangea-chat + steps: + - uses: actions/checkout@v6 + - run: cat .github/workflows/versions.env >> $GITHUB_ENV + - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + - name: Download web + uses: actions/download-artifact@v4 + with: + name: web + path: build/web + - name: Update packages + run: flutter pub get + - name: Upload source maps to Sentry + run: flutter packages pub run sentry_dart_plugin