-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create sentry.yml for debugID uploads to sentry (#1332)
- Loading branch information
1 parent
4cd0f99
commit 113b1ae
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: sentryConfig | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit_hash: | ||
description: 'The commit hash (or branch/tag) to build' | ||
required: true | ||
default: 'master' | ||
|
||
jobs: | ||
createSentryRelease: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.commit_hash }} | ||
|
||
- name: Install dependencies | ||
env: | ||
SENTRY_RELEASE: advisor-${{ github.event.inputs.commit_hash }} | ||
run: npm ci | ||
|
||
- name: Build | ||
env: | ||
SENTRY_RELEASE: advisor-${{ github.event.inputs.commit_hash }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
run: npm run build --if-present | ||
|
||
- name: Create a Sentry.io release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
with: | ||
tagName: ${{ github.event.inputs.commit_hash }} | ||
releaseNamePrefix: advisor | ||
environment: master | ||
sourcemaps: 'dist/sourcemaps' | ||
|
||
- name: Upload debug files to Sentry | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
run: | | ||
curl -sL https://sentry.io/get-cli/ | bash # Install Sentry CLI | ||
export SENTRY_RELEASE=advisor-${{ github.event.inputs.commit_hash }} | ||
sentry-cli upload-dif \ | ||
--include-sources \ | ||
--org $SENTRY_ORG \ | ||
--project $SENTRY_PROJECT \ | ||
--release $SENTRY_RELEASE \ | ||
--dist dist/sourcemaps |