@@ -142,61 +142,6 @@ jobs:
142142 echo "::error::Skill files are out of date. Run 'bun run generate:docs' locally and commit the result."
143143 exit 1
144144
145- eval-skill :
146- name : Eval SKILL.md
147- needs : [changes]
148- if : needs.changes.outputs.skill == 'true'
149- runs-on : ubuntu-latest
150- steps :
151- # For fork PRs: check if eval has already passed via commit status
152- - name : Detect fork
153- id : detect-fork
154- run : |
155- if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
156- echo "is_fork=true" >> "$GITHUB_OUTPUT"
157- fi
158- - name : Check fork eval status
159- if : steps.detect-fork.outputs.is_fork == 'true'
160- env :
161- GH_TOKEN : ${{ github.token }}
162- run : |
163- SHA="${{ github.event.pull_request.head.sha }}"
164- STATUS=$(gh api "repos/${{ github.repository }}/commits/$SHA/statuses" \
165- --jq '[.[] | select(.context == "eval-skill/fork")] | first | .state // "none"')
166- if [[ "$STATUS" != "success" ]]; then
167- echo "::error::Fork PR modifies skill files but eval has not passed for commit $SHA."
168- echo "::error::A maintainer must review the code and add the 'eval-skill' label."
169- exit 1
170- fi
171- echo "Fork eval passed for $SHA"
172- # For internal PRs: run the eval directly
173- - uses : actions/checkout@v6
174- if : steps.detect-fork.outputs.is_fork != 'true'
175- - uses : oven-sh/setup-bun@v2
176- if : steps.detect-fork.outputs.is_fork != 'true'
177- - uses : actions/cache@v5
178- if : steps.detect-fork.outputs.is_fork != 'true'
179- id : cache
180- with :
181- path : node_modules
182- key : node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
183- - if : steps.detect-fork.outputs.is_fork != 'true' && steps.cache.outputs.cache-hit != 'true'
184- run : bun install --frozen-lockfile
185- - name : Generate docs and skill files
186- if : steps.detect-fork.outputs.is_fork != 'true'
187- run : bun run generate:schema && bun run generate:docs
188- - name : Eval SKILL.md
189- if : steps.detect-fork.outputs.is_fork != 'true'
190- run : bun run eval:skill
191- env :
192- ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
193- - name : Upload eval results
194- if : always() && steps.detect-fork.outputs.is_fork != 'true'
195- uses : actions/upload-artifact@v7
196- with :
197- name : skill-eval-results
198- path : test/skill-eval/results.json
199-
200145 lint :
201146 name : Lint & Typecheck
202147 needs : [changes]
@@ -597,7 +542,7 @@ jobs:
597542
598543 test-e2e :
599544 name : E2E Tests
600- needs : [build-binary]
545+ needs : [build-binary, changes ]
601546 runs-on : ubuntu-latest
602547 steps :
603548 - uses : actions/checkout@v6
@@ -621,6 +566,9 @@ jobs:
621566 - name : E2E Tests
622567 env :
623568 SENTRY_CLI_BINARY : ${{ github.workspace }}/dist-bin/sentry-linux-x64
569+ # Pass API key only when skill files changed — the skill-eval e2e test
570+ # auto-skips when the key is absent, so non-skill PRs aren't affected.
571+ ANTHROPIC_API_KEY : ${{ needs.changes.outputs.skill == 'true' && secrets.ANTHROPIC_API_KEY || '' }}
624572 run : bun run test:e2e
625573
626574 build-npm :
@@ -662,7 +610,7 @@ jobs:
662610
663611 build-docs :
664612 name : Build Docs
665- needs : [lint]
613+ needs : [lint, build-binary ]
666614 runs-on : ubuntu-latest
667615 steps :
668616 - uses : actions/checkout@v6
@@ -674,18 +622,50 @@ jobs:
674622 key : node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
675623 - if : steps.cache.outputs.cache-hit != 'true'
676624 run : bun install --frozen-lockfile
625+ - name : Get CLI version
626+ id : version
627+ run : echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"
628+ - name : Download compiled CLI binary
629+ uses : actions/download-artifact@v8
630+ with :
631+ name : sentry-linux-x64
632+ path : dist-bin
633+ - name : Make binary executable
634+ run : chmod +x dist-bin/sentry-linux-x64
677635 - name : Generate docs content
678636 run : bun run generate:schema && bun run generate:docs
679637 - name : Build Docs
680638 working-directory : docs
639+ env :
640+ PUBLIC_SENTRY_ENVIRONMENT : production
641+ SENTRY_RELEASE : ${{ steps.version.outputs.version }}
642+ PUBLIC_SENTRY_RELEASE : ${{ steps.version.outputs.version }}
681643 run : |
682644 bun install --frozen-lockfile
683645 bun run build
646+ # Inject debug IDs and upload sourcemaps. The inject step adds
647+ # //# debugId= and the _sentryDebugIds IIFE to deployed JS files.
648+ # Both steps require SENTRY_AUTH_TOKEN (the CLI checks auth on startup).
649+ - name : Inject debug IDs and upload sourcemaps
650+ if : github.event_name == 'push' && env.SENTRY_AUTH_TOKEN != ''
651+ env :
652+ SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
653+ SENTRY_ORG : sentry
654+ SENTRY_PROJECT : cli-website
655+ run : |
656+ ./dist-bin/sentry-linux-x64 sourcemap inject docs/dist/
657+ ./dist-bin/sentry-linux-x64 sourcemap upload docs/dist/ \
658+ --release "${{ steps.version.outputs.version }}" \
659+ --url-prefix "~/"
660+ # Remove .map files — they were uploaded to Sentry but shouldn't
661+ # be deployed to production.
662+ - name : Remove sourcemaps from output
663+ run : find docs/dist -name '*.map' -delete
684664 - name : Package Docs
685665 run : |
686666 cp .nojekyll docs/dist/
687667 cd docs/dist && zip -r ../../gh-pages.zip .
688- - name : Upload artifact
668+ - name : Upload docs artifact
689669 uses : actions/upload-artifact@v7
690670 with :
691671 name : gh-pages
@@ -694,15 +674,15 @@ jobs:
694674 ci-status :
695675 name : CI Status
696676 if : always()
697- needs : [changes, check-generated, eval-skill, build-binary, build-npm, build-docs, test-e2e, generate-patches, publish-nightly]
677+ needs : [changes, check-generated, build-binary, build-npm, build-docs, test-e2e, generate-patches, publish-nightly]
698678 runs-on : ubuntu-latest
699679 permissions : {}
700680 steps :
701681 - name : Check CI status
702682 run : |
703683 # Check for explicit failures or cancellations in all jobs
704684 # generate-patches and publish-nightly are skipped on PRs — that's expected
705- results="${{ needs.check-generated.result }} ${{ needs.eval-skill.result }} ${{ needs. build-binary.result }} ${{ needs.build-npm.result }} ${{ needs.build-docs.result }} ${{ needs.test-e2e.result }} ${{ needs.generate-patches.result }} ${{ needs.publish-nightly.result }}"
685+ results="${{ needs.check-generated.result }} ${{ needs.build-binary.result }} ${{ needs.build-npm.result }} ${{ needs.build-docs.result }} ${{ needs.test-e2e.result }} ${{ needs.generate-patches.result }} ${{ needs.publish-nightly.result }}"
706686 for result in $results; do
707687 if [[ "$result" == "failure" || "$result" == "cancelled" ]]; then
708688 echo "::error::CI failed"
@@ -720,9 +700,4 @@ jobs:
720700 echo "::error::CI failed - upstream job failed causing check-generated to be skipped"
721701 exit 1
722702 fi
723- if [[ "${{ needs.changes.outputs.skill }}" == "true" && "${{ needs.eval-skill.result }}" == "skipped" ]]; then
724- echo "::error::CI failed - upstream job failed causing eval-skill to be skipped"
725- exit 1
726- fi
727-
728703 echo "CI passed"
0 commit comments