| name | git-release |
| description | Git release workflow with semantic versioning and changelogs |
| license | MIT |
Git Release Skill
Use this skill when preparing releases, managing versions, and generating changelogs.
When to Use
- Preparing a new release
- Updating version numbers
- Generating changelogs
- Creating release tags
- Publishing to npm/package registries
Semantic Versioning
MAJOR.MINOR.PATCH
│ │ │
│ │ └── Bug fixes (backwards compatible)
│ └──────── New features (backwards compatible)
└────────────── Breaking changes
Version Bump Rules
| Change Type | Example | Version Bump |
|---|
| Breaking API change | Remove function | MAJOR (1.0.0 → 2.0.0) |
| New feature | Add endpoint | MINOR (1.0.0 → 1.1.0) |
| Bug fix | Fix crash | PATCH (1.0.0 → 1.0.1) |
| Documentation | Update README | PATCH (optional) |
| Refactor (no API change) | Internal cleanup | PATCH (optional) |
Pre-release Versions
1.0.0-alpha.1 # Alpha release
1.0.0-beta.1 # Beta release
1.0.0-rc.1 # Release candidate
Commit Convention
Use Conventional Commits:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types
| Type | Description | Version Bump |
|---|
feat | New feature | MINOR |
fix | Bug fix | PATCH |
docs | Documentation | None |
style | Formatting | None |
refactor | Code restructure | None |
perf | Performance | PATCH |
test | Tests | None |
chore | Maintenance | None |
BREAKING CHANGE | Breaking change | MAJOR |
Examples
git commit -m "feat(auth): add OAuth2 login support"
git commit -m "fix(api): handle null response from payment provider"
git commit -m "feat(api)!: change user endpoint response format
BREAKING CHANGE: User endpoint now returns nested profile object"
git commit -m "fix(ui): correct button alignment on mobile"
git commit -m "refactor(database): migrate to connection pooling
- Replace individual connections with pool
- Add connection timeout handling
- Update all database queries to use pool"
Release Workflow
1. Pre-Release Checks
git status
git branch --show-current
git pull origin main
npm test
npm run build
npm audit
2. Version Bump
npm version patch
npm version minor
npm version major
npm version prerelease --preid=alpha
npm version prerelease --preid=beta
npm version prerelease --preid=rc
3. Generate Changelog
npx conventional-changelog -p angular -i CHANGELOG.md -s
npx standard-version
npx standard-version --release-as minor
npx standard-version --prerelease alpha
4. Create Tag and Push
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin main --follow-tags
5. Create GitHub Release
gh release create v1.2.0 \
--title "v1.2.0" \
--notes-file RELEASE_NOTES.md
gh release create v1.2.0 --generate-notes
gh release create v1.2.0 --draft
6. Publish (if applicable)
npm publish
npm publish --tag next
npm publish --tag beta
Changelog Format
# Changelog
All notable changes to this project will be documented in this file.
## [1.2.0] - 2024-01-15
### Added
- OAuth2 login support for Google and GitHub (#123)
- Dark mode toggle in settings (#145)
### Changed
- Improved loading performance for dashboard (#156)
- Updated dependencies to latest versions
### Fixed
- Fixed button alignment on mobile devices (#167)
- Corrected timezone handling in date picker (#172)
### Security
- Updated jsonwebtoken to fix CVE-2023-XXXXX
## [1.1.0] - 2024-01-01
### Added
- Initial release with core features
GitHub Actions for Releases
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm test
- run: npm run build
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Release Checklist
Before Release
Release
After Release
Hotfix Process
git checkout -b hotfix/1.2.1 v1.2.0
git commit -m "fix(critical): resolve payment processing error"
npm version patch
git push origin hotfix/1.2.1
git checkout main
git pull
git tag -a v1.2.1 -m "Hotfix v1.2.1"
git push origin v1.2.1
Rollback Process
git revert HEAD
git checkout v1.1.0
npm version patch
git push origin main --follow-tags