Skip to content

feat: integrate sentry.io for advanced error tracings and stacks #2

feat: integrate sentry.io for advanced error tracings and stacks

feat: integrate sentry.io for advanced error tracings and stacks #2

name: Build and Upload Source Maps
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16" # Specify your Node.js version
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Install Sentry CLI
run: npm install -g @sentry/cli
- name: Inject id
run: sentry-cli sourcemaps inject dist
- name: Upload source maps to Sentry
env:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_URL: https://sentry.io/ # Change if you're using a self-hosted Sentry instance
run: |
sentry-cli sourcemaps upload ./dist -o $SENTRY_ORG -p $SENTRY_PROJECT