Skip to content

Commit

Permalink
fix: add sentry auth token to enable sourcemap upload (#168)
Browse files Browse the repository at this point in the history
this will give us nice stack traces and other conveniences in Sentry
  • Loading branch information
travis authored Dec 19, 2024
1 parent 562bf8f commit a48c8c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-storacha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
echo "NEXT_PUBLIC_REFERRAL_URL=http://staging.storacha.network/referred" >> .env
echo "NEXT_PUBLIC_REFERRALS_SERVICE_URL=https://staging-referrals.storacha.network" >> .env
echo "NEXT_PUBLIC_SENTRY_ENV=staging" >> .env
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
# as long as this uses https://github.com/cloudflare/next-on-pages/blob/dc529d7efa8f8568ea8f71b5cdcf78df89be6c12/packages/next-on-pages/bin/index.js,
# env vars won't get passed through to wrangler, so if wrangler will need them, write them to .env like the previous step
- run: pnpm pages:build
Expand Down Expand Up @@ -141,6 +142,7 @@ jobs:
echo "NEXT_PUBLIC_REFERRAL_URL=http://storacha.network/referred" >> .env
echo "NEXT_PUBLIC_REFERRALS_SERVICE_URL=https://referrals.storacha.network" >> .env
echo "NEXT_PUBLIC_SENTRY_ENV=production" >> .env
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
- run: pnpm pages:build
# as long as this uses https://github.com/cloudflare/next-on-pages/blob/dc529d7efa8f8568ea8f71b5cdcf78df89be6c12/packages/next-on-pages/bin/index.js,
# env vars won't get passed through to wrangler, so if wrangler will need them, write them to .env like the previous step
Expand Down
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const { withSentryConfig } = require("@sentry/nextjs");
module.exports = withSentryConfig(
module.exports,
{
authToken: process.env.SENTRY_AUTH_TOKEN,

// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

Expand Down

0 comments on commit a48c8c4

Please sign in to comment.