Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

ci: update sentry job

AykutSaracd025866c837d
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 82c5b337..c397f7d4 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -73,22 +73,24 @@ jobs:
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Static HTML export with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next export
- - name: List files in current directory
- run: |
- ls -al
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './out'
- - name: Create Sentry 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:
- environment: production
- sourcemaps: ./out
+ - name: Sentry
+ run: |
+ # Install Sentry CLI
+ curl -sL https://sentry.io/get-cli/ | bash
+
+ # Create new Sentry release
+ export SENTRY_RELEASE=$(sentry-cli releases propose-version)
+ sentry-cli releases new -p $SENTRY_PROJECT $SENTRY_RELEASE
+ sentry-cli releases set-commits --auto $SENTRY_RELEASE
+ sentry-cli sourcemaps upload --release=$SENTRY_RELEASE /.out/_next/static/chunks
+ sentry-cli releases finalize $SENTRY_RELEASE
+
+ # Create new deploy for this Sentry release
+ sentry-cli releases deploys $SENTRY_RELEASE new -e $SENTRY_DEPLOY_ENVIRONMENT
# Deployment job
deploy:
@@ -101,3 +103,15 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
+
+ sentry:
+ runs-on: ubuntu-18.04
+ env:
+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
+ SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
diff --git a/sentry.client.config.ts b/sentry.client.config.ts
index af49fc88..9059dc4d 100644
--- a/sentry.client.config.ts
+++ b/sentry.client.config.ts
@@ -1,28 +1,16 @@
-// This file configures the initialization of Sentry on the client.
-// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from "@sentry/nextjs";
Sentry.init({
enabled: process.env.NODE_ENV === "development",
dsn: "https://[email protected]/6495191",
-
- // Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.2,
-
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
-
+ release: `${process.env.SENTRY_RELEASE || "production"}`,
replaysOnErrorSampleRate: 1.0,
-
- // This sets the sample rate to be 10%. You may want this to be 100% while
- // in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
-
- // You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
new Sentry.Replay({
- // Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),