Releases and sentry-cli
Uncaught implements the part of Sentry's API that sentry-cli and Sentry's bundler plugins use. Create
releases, mark deploys and upload source maps from CI with the tools you already know.
API tokens
CI authenticates with an organization API token. An owner or admin creates one under Settings → API tokens in Uncaught. It's shown once, so copy it into your CI's secrets right away. A token works for every project in the organization, and you can revoke it from the same page.
Point sentry-cli at Uncaught
Set these variables in your CI. The organization and project are the slugs from their URLs in Uncaught:
SENTRY_URL=https://uncaught.thistinct.tools/
SENTRY_ORG=your-organization
SENTRY_PROJECT=your-project
SENTRY_AUTH_TOKEN=uncaught_…Then check the connection:
npx @sentry/cli releases listCreate a release
Use the same version string your SDK sends as release, often the commit SHA. A typical deploy job looks
like this:
export RELEASE=$(git rev-parse --short HEAD)
npx @sentry/cli releases new "$RELEASE"
npx @sentry/cli sourcemaps inject ./dist # JavaScript only
npx @sentry/cli sourcemaps upload --release "$RELEASE" ./dist
npx @sentry/cli releases finalize "$RELEASE"
npx @sentry/cli releases deploys "$RELEASE" new -e productionFinalizing a release, or marking a deploy, records when it went out. Errors from it show up on the release's page in Uncaught, along with the issues it introduced.
GitHub Actions
- name: Create a release in Uncaught
env:
SENTRY_URL: https://uncaught.thistinct.tools/
SENTRY_ORG: your-organization
SENTRY_PROJECT: your-project
SENTRY_AUTH_TOKEN: ${{ secrets.UNCAUGHT_AUTH_TOKEN }}
run: |
npx @sentry/cli releases new "$GITHUB_SHA"
npx @sentry/cli sourcemaps inject ./dist
npx @sentry/cli sourcemaps upload --release "$GITHUB_SHA" ./dist
npx @sentry/cli releases finalize "$GITHUB_SHA"What's supported
releases new,finalize,info,listanddeployssourcemaps injectandsourcemaps upload, with Debug IDs or by release- The Vite, webpack, Rollup and esbuild plugins, which use the same upload API
Commands for features Uncaught doesn't have, like releases set-commits, debug files and cron monitors,
aren't supported. Leave them out of your scripts.