This directory uses semantic-release to automate versioning and publishing.
We follow Angular Commit Message Conventions:
<type>(<scope>): <subject>
<body>
<footer>
- feat: A new feature (MINOR version bump)
- fix: A bug fix (PATCH version bump)
- perf: A code change that improves performance (PATCH version bump)
- docs: Documentation only changes
- style: Changes that don't affect code meaning (formatting, whitespace, etc.)
- refactor: Code refactor without feature/fix changes
- test: Adding or updating tests
- chore: Changes to build process, dependencies, etc.
Add BREAKING CHANGE: in the footer to trigger a MAJOR version bump:
feat: redesign authentication API
BREAKING CHANGE: The login() function signature has changed.
Use authenticate() instead.
Feature (MINOR)
feat(jwt): add token refresh functionality
Bug Fix (PATCH)
fix(password): handle special characters in validation
Breaking Change (MAJOR)
feat(api): update authentication interface
BREAKING CHANGE: old auth methods are deprecated
- Commit with conventional commit message to
main,beta, oralphabranch - Push to trigger the release workflow
- semantic-release automatically:
- Determines next version (major/minor/patch)
- Generates CHANGELOG.md
- Updates package.json
- Publishes to npm as
cortex-auth - Publishes to GitHub Packages as
@cortex-reply/auth - Creates a GitHub Release
- Commits version bump back to the repo
You don't need to manually run version scripts. Just commit with proper messages:
# Make changes
git add .
git commit -m "feat(auth): add 2FA support"
git push origin main
# → Automatic: version bumped, published to both registries, GitHub release createdGitHub Actions secrets needed:
NPM_TOKEN: Your npm registry tokenGITHUB_TOKEN: Automatically provided by GitHub Actions
Push to main - publishes as latest
Push to beta - publishes with beta tag
Push to alpha - publishes with alpha tag
Interactive commit helper:
pnpm add -D commitizen cz-conventional-changelog
# Then use:
git czEnforce commit message conventions:
pnpm add -D commitlint @commitlint/config-conventional