Skip to content

Commit 3f947fd

Browse files
committed
chore(sentry): setup github workflow
1 parent 574abea commit 3f947fd

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242

4343
- name: Run build
4444
run: pnpm run build
45+
env:
46+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
47+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
48+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
4549

4650
- name: Run tests with coverage
4751
run: pnpm vitest run --coverage

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
cache-dependency-path: pnpm-lock.yaml
3434
- run: pnpm install --frozen-lockfile
3535
- run: pnpm run build
36+
env:
37+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
38+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
39+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3640
- name: Run unit tests
3741
run: pnpm vitest run --exclude tests/integration/**
3842
- name: Run integration tests

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,21 @@ To set up the `HEVY_API_KEY` secret:
322322

323323
If the secret is not set, the integration tests will fail (by design).
324324

325+
To set up Sentry secrets for source map uploads during builds:
326+
327+
The build process uses Sentry's Rollup plugin to upload source maps. You need to configure three secrets:
328+
329+
1. Go to your GitHub repository
330+
2. Click on "Settings" > "Secrets and variables" > "Actions"
331+
3. Add the following secrets:
332+
- `SENTRY_ORG`: Your Sentry organization slug
333+
- `SENTRY_PROJECT`: Your Sentry project slug
334+
- `SENTRY_AUTH_TOKEN`: A Sentry auth token with `project:releases` scope
335+
336+
You can create a Sentry auth token at: https://sentry.io/settings/account/api/auth-tokens/
337+
338+
If these secrets are not set, the build will still succeed, but source maps will not be uploaded to Sentry.
339+
325340
Note: GitHub does not provide secrets to pull requests from forks by default, so
326341
fork PRs may fail CI unless a maintainer reruns the checks with `HEVY_API_KEY`
327342
available.

0 commit comments

Comments
 (0)