home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-ci-integration

This skill helps you integrate Sentry with CI/CD pipelines by automating releases, source maps, and deploy alerts across GitHub Actions and more.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-ci-integration

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
1.8 KB
---
name: sentry-ci-integration
description: |
  Manage integrate Sentry with CI/CD pipelines.
  Use when setting up GitHub Actions, GitLab CI, or other CI systems
  with Sentry releases and source maps.
  Trigger with phrases like "sentry github actions", "sentry CI",
  "sentry pipeline", "automate sentry releases".
allowed-tools: Read, Write, Edit, Bash(gh:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Ci Integration

## Prerequisites

- Sentry CLI installed or available in CI
- `SENTRY_AUTH_TOKEN` secret configured
- `SENTRY_ORG` and `SENTRY_PROJECT` environment variables set
- Source maps generated during build

## Instructions

1. Add SENTRY_AUTH_TOKEN secret to CI platform (GitHub, GitLab, CircleCI)
2. Configure SENTRY_ORG and SENTRY_PROJECT environment variables
3. Create workflow step to build application with SENTRY_RELEASE env
4. Add step to create Sentry release using sentry-cli or action
5. Upload source maps from build output directory
6. Associate commits with release using set-commits --auto
7. Finalize the release to mark it complete
8. Add deploy notification step for environment tracking
9. Configure checkout with fetch-depth: 0 for full git history
10. Test workflow by pushing to trigger release creation

## Output
- Release created and finalized in Sentry
- Source maps uploaded for stack trace mapping
- Commits associated with release
- Deploy notification sent to Sentry

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry CI/CD](https://docs.sentry.io/product/releases/setup/release-automation/)
- [GitHub Action](https://github.com/getsentry/action-release)

Overview

This skill manages integration of Sentry with CI/CD pipelines to automate release creation, source map uploads, commit association, and deploy notifications. It streamlines setup for GitHub Actions, GitLab CI, CircleCI, and other CI systems so releases in Sentry reflect your builds accurately. The result is faster, more reliable error mapping and environment tracking across deployments.

How this skill works

The skill configures CI steps that set SENTRY_RELEASE, create a Sentry release using sentry-cli or official actions, upload generated source maps, and associate commits via set-commits --auto. It finalizes the release and optionally sends a deploy notification for environment tracking. It also enforces a full git fetch (fetch-depth: 0) so commit association and source map provenance work reliably.

When to use it

  • Setting up Sentry for a new project’s CI pipeline
  • Automating release creation and source map upload on each build
  • Associating commits and marking releases as deployed
  • Troubleshooting missing source maps or unmapped stack traces
  • Ensuring release metadata and deploy environments are reported to Sentry

Best practices

  • Store SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT as secure CI secrets
  • Set fetch-depth: 0 in checkout to enable accurate commit association
  • Generate source maps during the build and target the upload step to the build output directory
  • Use SENTRY_RELEASE tied to your CI build ID or git SHA for consistent mapping
  • Call set-commits --auto before finalizing the release to attach commits

Example use cases

  • GitHub Actions workflow that sets SENTRY_RELEASE, runs build, uploads source maps, associates commits, and finalizes release
  • GitLab CI job that installs sentry-cli, exports SENTRY_* vars, uploads source maps, and sends deploy notification
  • CircleCI pipeline that adds a release step after successful build and test stages to ensure production errors map correctly to source
  • A deployment job that finalizes a release and posts an environment deploy to Sentry for release health tracking

FAQ

What CI secrets are required?

You need SENTRY_AUTH_TOKEN and environment variables SENTRY_ORG and SENTRY_PROJECT stored as secure CI secrets.

Why set fetch-depth: 0?

Full git history is required so set-commits --auto can identify and associate the correct commits with the Sentry release.