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.
This commit is contained in:
parent
6b83b2d8a8
commit
9ada5f6748
2 changed files with 26 additions and 3 deletions
5
.github/workflows/main_deploy.yaml
vendored
5
.github/workflows/main_deploy.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
24
.github/workflows/release.yaml
vendored
24
.github/workflows/release.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue