Sentry using dart
This commit is contained in:
parent
62ae075996
commit
17c95baacb
4 changed files with 17 additions and 56 deletions
43
.github/workflows/main_deploy.yaml
vendored
43
.github/workflows/main_deploy.yaml
vendored
|
|
@ -28,55 +28,32 @@ jobs:
|
|||
run: ./scripts/prepare-web.sh
|
||||
- name: Build Release Web
|
||||
run: ./scripts/build-web.sh
|
||||
|
||||
- name: Upload files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: web
|
||||
path: build/web
|
||||
|
||||
deploy_web:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_web
|
||||
environment: staging
|
||||
steps:
|
||||
- name: Download web
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: web
|
||||
path: build/web
|
||||
- name: Update Website files
|
||||
run: |
|
||||
mv build/web public
|
||||
touch public/.env
|
||||
echo "$WEB_APP_ENV" >> public/.env
|
||||
cp public/.env public/assets/.env
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||
publish_dir: ./public
|
||||
publish_branch: gh-pages
|
||||
cname: app.staging.pangea.chat
|
||||
|
||||
update_sentry:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_web
|
||||
environment: staging
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_BASE_TOKEN: ${{ secrets.SENTRY_BASE_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
CI_COMMIT_SHA: ${{ github.sha }}
|
||||
SENTRY_RELEASE: ${{ github.sha }}
|
||||
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
||||
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- 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@v3
|
||||
with:
|
||||
name: web
|
||||
path: build/web
|
||||
- name: Install sentry CLI
|
||||
run: |
|
||||
curl -sL https://sentry.io/get-cli/ | bash
|
||||
- name: Update sentry
|
||||
run: ./scripts/upload-sentry.sh
|
||||
run: flutter packages pub run sentry_dart_plugin
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ dev_dependencies:
|
|||
sdk: flutter
|
||||
license_checker: ^1.6.0
|
||||
msix: ^3.6.2
|
||||
sentry_dart_plugin: ^1.0.0
|
||||
translations_cleaner: ^0.0.5
|
||||
|
||||
flutter_native_splash:
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh -ve
|
||||
|
||||
# Build a release version of the app for a platform and upload symbols
|
||||
export OUTPUT_FOLDER_WEB=./build/web/
|
||||
export SENTRY_RELEASE=$CI_COMMIT_SHA
|
||||
export SENTRY_PROJECT="${SENTRY_PROJECT:-client}"
|
||||
export SENTRY_ORG="${SENTRY_ORG:-pangea-chat}"
|
||||
|
||||
echo "[run] Uploading sourcemaps for $SENTRY_RELEASE"
|
||||
echo "[run] $SENTRY_PROJECT @ $SENTRY_ORG / $OUTPUT_FOLDER_WEB"
|
||||
sentry-cli releases new $SENTRY_RELEASE --org $SENTRY_ORG
|
||||
sentry-cli releases set-commits $CI_COMMIT_SHA --auto
|
||||
sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \
|
||||
--ext dart \
|
||||
--rewrite
|
||||
|
||||
(cd $OUTPUT_FOLDER_WEB
|
||||
sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \
|
||||
--ext map \
|
||||
--ext js \
|
||||
--rewrite)
|
||||
|
||||
sentry-cli releases finalize $SENTRY_RELEASE
|
||||
6
sentry.properties
Normal file
6
sentry.properties
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
upload_debug_symbols=true
|
||||
upload_source_maps=true
|
||||
upload_sources=true
|
||||
wait_for_processing=false
|
||||
log_level=info
|
||||
commits=auto
|
||||
Loading…
Add table
Reference in a new issue