Skip to content

Commit 4cde4be

Browse files
committed
fix: gate inject+upload on SENTRY_AUTH_TOKEN (CLI requires auth)
1 parent 5c145cd commit 4cde4be

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -694,18 +694,17 @@ jobs:
694694
run: |
695695
bun install --frozen-lockfile
696696
bun run build
697-
# Inject debug IDs into the built JS files BEFORE packaging.
698-
# This ensures deployed files have the //# debugId= comment and the
699-
# _sentryDebugIds IIFE so runtime events carry debug_meta.
700-
- name: Inject debug IDs
701-
run: ./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/
702-
- name: Upload sourcemaps to Sentry
703-
if: github.event_name == 'push'
697+
# Inject debug IDs and upload sourcemaps. The inject step adds
698+
# //# debugId= and the _sentryDebugIds IIFE to deployed JS files.
699+
# Both steps require SENTRY_AUTH_TOKEN (the CLI checks auth on startup).
700+
- name: Inject debug IDs and upload sourcemaps
701+
if: github.event_name == 'push' && env.SENTRY_AUTH_TOKEN != ''
704702
env:
705703
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
706704
SENTRY_ORG: sentry
707705
SENTRY_PROJECT: cli-website
708706
run: |
707+
./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/
709708
./dist-bin/sentry-linux-x64 sourcemap upload docs/dist/ \
710709
--release "${{ steps.version.outputs.version }}" \
711710
--url-prefix "~/"

.github/workflows/docs-preview.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,14 @@ jobs:
4949
bun install --frozen-lockfile
5050
bun run build
5151
52-
- name: Inject debug IDs
53-
run: bun run --bun src/bin.ts sourcemap inject docs/dist/
54-
- name: Upload sourcemaps to Sentry
52+
- name: Inject debug IDs and upload sourcemaps
5553
if: env.SENTRY_AUTH_TOKEN != ''
5654
env:
5755
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
5856
SENTRY_ORG: sentry
5957
SENTRY_PROJECT: cli-website
6058
run: |
59+
bun run --bun src/bin.ts sourcemap inject docs/dist/
6160
bun run --bun src/bin.ts sourcemap upload docs/dist/ \
6261
--release "${{ steps.version.outputs.version }}" \
6362
--url-prefix "~/"

0 commit comments

Comments
 (0)