This project uses semantic-release with conventional commits to automatically manage versioning and releases.
- Commit Messages: All commits must follow the conventional commit format
- Analysis: semantic-release analyzes commit messages to determine version bumps
- Versioning: Follows semantic versioning (MAJOR.MINOR.PATCH)
- Changelog: Automatically generates CHANGELOG.md
- Release: Creates GitHub releases (when repository is configured)
| Commit Type | Version Bump | Example |
|---|---|---|
feat |
Minor (0.1.0 → 0.2.0) | feat(cli): add batch operations |
fix |
Patch (0.1.0 → 0.1.1) | fix(core): resolve link parsing issue |
BREAKING CHANGE |
Major (0.1.0 → 1.0.0) | feat!: change API interface |
| Other types | Patch | docs: update README |
- Main semantic-release configuration
- Defines plugins and rules for version analysis
- Configures changelog generation
- Validates commit message format
- Enforces conventional commit standards
ci.yml: Continuous integration for all branchesrelease.yml: Automated releases on main branch
git add .
git commit -m "feat(cli): add support for glob patterns"npm run commitThis will prompt you to build a proper conventional commit.
Releases happen automatically when commits are pushed to the main branch:
- CI runs tests, linting, and builds
- If tests pass, semantic-release analyzes commits
- If version bump is needed:
- Updates package.json version
- Generates/updates CHANGELOG.md
- Creates git tag
- Creates GitHub release (if configured)
- Publishes to npm (if configured)
# Dry run (see what would happen)
npm run release:dry
# Actual release (requires proper git setup)
npm run release- Create feature branch from main
- Make changes with conventional commits
- Push branch and create PR
- Merge PR to main
- Automatic release triggers (if changes warrant it)
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting, etc.)
- refactor: Code restructuring without functionality changes
- perf: Performance improvements
- test: Test additions or modifications
- build: Build system changes
- ci: CI configuration changes
- chore: Maintenance tasks
- revert: Reverting previous commits
To indicate breaking changes, either:
- Add
!after type:feat(api)!: change response format - Add footer:
feat(api): change response format BREAKING CHANGE: API now returns JSON instead of XML
# New feature (minor bump)
feat(cli): add support for configuration files
# Bug fix (patch bump)
fix(parser): handle edge case with nested links
# Breaking change (major bump)
feat(api)!: redesign CLI argument structure
BREAKING CHANGE: Command arguments have been restructured.
Use --input instead of --source for input files.
# Documentation (patch bump)
docs(readme): add installation instructions
# Chore (patch bump)
chore(deps): update typescript to v5.0This automated versioning ensures consistent releases and clear communication of changes to users.