Skip to content

Commit 1e1480a

Browse files
committed
Upload source maps to Sentry in release builds
1 parent b23da0e commit 1e1480a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ jobs:
3535
3636
# Fix $HOME perms to make Firefox happy
3737
chown $(whoami) $HOME
38+
3839
- run: npm run build
40+
env:
41+
SENTRY_AUTH_TOKEN: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && secrets.SENTRY_AUTH_TOKEN) || '' }}
42+
SENTRY_ORG: http-toolkit
43+
SENTRY_PROJECT: httptoolkit-server
44+
3945
- run: xvfb-run npm run test
4046
- run: xvfb-run npm run test:release
4147

webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ const pjson = require('./package.json');
77

88
const OUTPUT_DIR = path.resolve(__dirname, 'bundle');
99

10+
console.log(
11+
process.env.SENTRY_AUTH_TOKEN
12+
? "* Webpack will upload source map to Sentry *"
13+
: "Sentry source map upload disabled - no token set"
14+
);
15+
1016
module.exports = {
1117
entry: {
1218
index: './src/index.ts',

0 commit comments

Comments
 (0)