sentry-release-management
$
npx mdskill add TheBushidoCollective/han/sentry-release-managementAutomate Sentry release creation, source map uploads, and deployment tracking.
- Executes CLI commands to finalize releases and associate commits automatically.
- Integrates with sentry-cli, GitHub Actions, and GitLab CI pipelines.
- Validates source maps before uploading to ensure build integrity.
- Outputs release status and commit associations directly to the terminal.
SKILL.md
.github/skills/sentry-release-managementView on GitHub ↗
---
name: sentry-release-management
description: Use when managing Sentry releases, uploading source maps, or tracking deployments. Covers release health and commit association.
allowed-tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
---
# Sentry - Release Management
Manage releases, upload source maps, and track deployments.
## Creating Releases
### Using sentry-cli
```bash
# Create a new release
sentry-cli releases new "$VERSION"
# Associate commits
sentry-cli releases set-commits "$VERSION" --auto
# Finalize the release
sentry-cli releases finalize "$VERSION"
```
### In CI/CD
```yaml
# GitHub Actions
- name: Create Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: your-org
SENTRY_PROJECT: your-project
with:
environment: production
version: ${{ github.sha }}
```
### GitLab CI
```yaml
release:
stage: deploy
script:
- sentry-cli releases new "$CI_COMMIT_SHA"
- sentry-cli releases set-commits "$CI_COMMIT_SHA" --auto
- sentry-cli releases finalize "$CI_COMMIT_SHA"
- sentry-cli releases deploys "$CI_COMMIT_SHA" new -e production
```
## Source Maps
### Upload Source Maps
```bash
# Upload source maps for a release
sentry-cli sourcemaps upload \
--release="$VERSION" \
--url-prefix="~/" \
./dist
# With validation
sentry-cli sourcemaps upload \
--release="$VERSION" \
--validate \
./dist
```
### Webpack Plugin
```javascript
// webpack.config.js
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
module.exports = {
devtool: "source-map",
plugins: [
sentryWebpackPlugin({
org: "your-org",
project: "your-project",
authToken: process.env.SENTRY_AUTH_TOKEN,
release: {
name: process.env.RELEASE_VERSION,
},
sourcemaps: {
assets: "./dist/**",
},
}),
],
};
```
### Vite Plugin
```typescript
// vite.config.ts
import { sentryVitePlugin } from "@sentry/vite-plugin";
export default defineConfig({
build: {
sourcemap: true,
},
plugins: [
sentryVitePlugin({
org: "your-org",
project: "your-project",
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
});
```
### Next.js
```javascript
// next.config.js
const { withSentryConfig } = require("@sentry/nextjs");
module.exports = withSentryConfig(nextConfig, {
org: "your-org",
project: "your-project",
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: true,
hideSourceMaps: true,
});
```
## Deployments
```bash
# Create a deployment
sentry-cli releases deploys "$VERSION" new \
--env production \
--started $(date +%s) \
--finished $(date +%s)
```
## Release Health
### Track in SDK
```typescript
Sentry.init({
dsn: "...",
release: "my-app@1.2.3",
environment: "production",
autoSessionTracking: true,
});
```
### Metrics Tracked
- **Crash-Free Sessions**: Percentage of sessions without crashes
- **Crash-Free Users**: Percentage of users without crashes
- **Session Count**: Total sessions for the release
- **Adoption**: User adoption rate
## Configuration Files
### .sentryclirc
```ini
[defaults]
org = your-org
project = your-project
[auth]
token = your-auth-token
```
### sentry.properties
```properties
defaults.org=your-org
defaults.project=your-project
auth.token=your-auth-token
```
## Best Practices
1. Use semantic versioning for releases
2. Associate commits for suspect commits feature
3. Upload source maps before deploying
4. Create deployments to track where releases run
5. Monitor release health before full rollout
6. Delete old source maps to manage storage
7. Use CI/CD integration for automated releases
## Cleanup
```bash
# Delete old releases
sentry-cli releases delete "$OLD_VERSION"
# Delete source maps (keeps release)
sentry-cli releases files "$VERSION" delete --all
```
More from TheBushidoCollective/han
- absinthe-resolversUse when implementing GraphQL resolvers with Absinthe. Covers resolver patterns, dataloader integration, batching, and error handling.
- absinthe-schemaUse when designing GraphQL schemas with Absinthe. Covers type definitions, interfaces, unions, enums, and schema organization patterns.
- absinthe-subscriptionsUse when implementing real-time GraphQL subscriptions with Absinthe. Covers Phoenix channels, PubSub, and subscription patterns.
- act-docker-setupUse when configuring Docker environments for act, selecting runner images, managing container resources, or troubleshooting Docker-related issues with local GitHub Actions testing.
- act-local-testingUse when testing GitHub Actions workflows locally with act. Covers act CLI usage, Docker configuration, debugging workflows, and troubleshooting common issues when running workflows on your local machine.
- act-workflow-syntaxUse when creating or modifying GitHub Actions workflow files. Provides guidance on workflow syntax, triggers, jobs, steps, and expressions for creating valid GitHub Actions workflows that can be tested locally with act.
- ameba-configurationUse when configuring Ameba rules and settings for Crystal projects including .ameba.yml setup, rule management, severity levels, and code quality enforcement.
- ameba-custom-rulesUse when creating custom Ameba rules for Crystal code analysis including rule development, AST traversal, issue reporting, and rule testing.
- ameba-integrationUse when integrating Ameba into development workflows including CI/CD pipelines, pre-commit hooks, GitHub Actions, and automated code review processes.
- analyze-performanceAnalyze performance metrics and identify slow transactions in Sentry