| name | release-management |
| description | Automate releases using semantic-release, create release notes, manage versions, and publish packages. Use when preparing releases, managing versions, or automating release workflows. |
| allowed-tools | Read, Edit, Write, Bash, Grep |
Release Management Skill
This skill helps you automate releases using semantic-release and manage version control effectively.
When to Use This Skill
- Creating new releases
- Automating version bumps
- Generating release notes
- Publishing packages
- Managing release branches
- Tagging versions
- Distributing releases
Release Strategy
The project uses semantic-release for automated releases:
- Automatic Versioning: Based on conventional commits
- Changelog Generation: Auto-generated from commits
- Git Tagging: Automatic git tags (v1.0.0, v1.1.0, etc.)
- GitHub Releases: Published to GitHub with notes
- NPM Publishing: Optional package publishing
Version Scheme
Semantic Versioning (SemVer)
v1.2.3
│ │ │
│ │ └─ Patch: Bug fixes (backward compatible)
│ └─── Minor: New features (backward compatible)
└───── Major: Breaking changes
Examples:
v1.0.0 → v1.0.1: Bug fix
v1.0.0 → v1.1.0: New feature
v1.0.0 → v2.0.0: Breaking change
Semantic Release Configuration
.releaserc.json
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{ "type": "feat", "release": "minor" },
{ "type": "fix", "release": "patch" },
{ "type": "perf", "release": "patch" },
{ "type": "revert", "release":
Release Workflow
Automatic Release (CI)
name: Release
on:
push:
branches: [main]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build
- name: Release
env:
Manual Release
npx semantic-release --dry-run
npx semantic-release
npx semantic-release --release-as minor
npx semantic-release --release-as major
npx semantic-release --release-as 1.2.3
Release Process
1. Commit Changes
vim src/feature.ts
git add .
git commit -m "feat: add new feature X
Implement feature X that does Y
Closes #123"
git push origin main
2. Automatic Release Triggers
3. Verify Release
open https://github.com/username/repo/releases
git fetch --tags
git tag
cat CHANGELOG.md
Version Bumping
Patch Release (0.0.x)
git commit -m "fix: resolve login timeout issue"
Minor Release (0.x.0)
git commit -m "feat: add export to CSV functionality"
Major Release (x.0.0)
git commit -m "feat!: redesign authentication system
BREAKING CHANGE: Auth tokens now use JWT format.
Update clients to use new authentication flow."
Release Notes
Auto-Generated Release Notes
Semantic-release generates release notes from commits:
# v1.2.0 (2024-01-15)
## Features
* add blog post generation with Gemini AI ([#123](https://github.com/user/repo/pull/123)) ([abc1234](https://github.com/user/repo/commit/abc1234))
* add social media integration ([#124](https://github.com/user/repo/pull/124)) ([def5678](https://github.com/user/repo/commit/def5678))
## Bug Fixes
* fix database connection timeout ([#125](https://github.com/user/repo/issues/125)) ([ghi9012](https://github.com/user/repo/commit/ghi9012))
* fix chart rendering on mobile ([#126](https://github.com/user/repo/issues/126)) ([jkl3456](https://github.com/user/repo/commit/jkl3456))
## Performance Improvements
* optimize database queries ([#127](https://github.com/user/repo/pull/127)) ([mno7890](https://github.com/user/repo/commit/mno7890))
Custom Release Notes
Edit after creation:
🎉 This release adds AI-powered blog generation!
If upgrading from v1.0.0, please:
1. Run database migrations: `pnpm db:migrate`
2. Update environment variables (see .env.example)
Thanks to @contributor1 and @contributor2!
Pre-releases
Beta Releases
git checkout -b beta
git commit -m "feat: add experimental feature"
{
"branches": [
"main",
{
"name": "beta",
"prerelease": true
}
]
}
git push origin beta
Release Candidates
git checkout -b release/1.1.0-rc
{
"branches": [
"main",
{
"name": "release/+([0-9])?(.{+([0-9]),x}).x",
"prerelease": "rc"
}
]
}
Hotfix Releases
Emergency Fixes
git checkout main
git checkout -b hotfix/critical-bug
git commit -m "fix: resolve critical security vulnerability"
git checkout main
git merge hotfix/critical-bug
git push origin main
Multi-Package Releases
Independent Versions
{
"version": "independent",
"packages": ["apps/*", "packages/*"]
}
Synchronized Versions
{
"version": "1.0.0",
"packages": ["apps/*", "packages/*"]
}
Release Checklist
Pre-Release
Post-Release
Rollback Strategy
Revert Release
git log --oneline
git revert <release-commit-sha>
git push origin main
git tag -d v1.2.0
git push origin :refs/tags/v1.2.0
git commit -m "fix: resolve issue from v1.2.0"
git push origin main
Notifications
Slack Notification
- name: Notify Slack
if: success()
uses: slackapi/slack-github-action@v1
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
payload: |
{
"text": "🚀 New release: v${{ steps.version.outputs.version }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*New Release*\nVersion: v${{ steps.version.outputs.version }}\nChangelog: https://github.com/user/repo/releases/tag/v${{ steps.version.outputs.version }}"
}
}
]
}
Best Practices
1. Conventional Commits
git commit -m "fixed stuff"
git commit -m "updates"
git commit -m "fix: resolve login timeout issue"
git commit -m "feat: add CSV export functionality"
git commit -m "feat!: redesign authentication
BREAKING CHANGE: New auth flow required"
2. Meaningful Changelogs
# ❌ Vague changelog
## [1.1.0]
- Added stuff
- Fixed things
# ✅ Clear changelog
## [1.1.0]
### Added
- Blog post generation with Google Gemini AI
- Social media integration (Discord, LinkedIn, Telegram, Twitter)
### Fixed
- Database connection timeout during large imports
- Chart rendering issue on iOS Safari
3. Test Before Release
git commit -m "feat: add feature"
git push
4. Document Breaking Changes
git commit -m "feat!: redesign API endpoints
BREAKING CHANGE: Endpoint paths changed.
- /api/cars → /api/v1/cars
- /api/coe → /api/v1/coe
Migration guide: docs.sgcarstrends.com/migration"
Troubleshooting
No Release Created
git log --oneline v1.0.0..HEAD
Wrong Version Bump
git log --oneline -1
Release Failed in CI
permissions:
contents: write
issues: write
pull-requests: write
References
Best Practices Summary
- Conventional Commits: Follow format for automatic versioning
- Automate Releases: Use semantic-release in CI
- Test Thoroughly: Ensure tests pass before merge
- Document Changes: Clear changelogs and migration guides
- Tag Versions: Use git tags for version tracking
- Notify Team: Alert on new releases
- Rollback Plan: Have strategy for reverting bad releases
- Pre-releases: Use beta/rc for testing before stable