This project uses semantic-release to automate version management and package publishing.
- Automated Versioning: Version numbers are automatically determined based on commit messages
- Automated Publishing: Packages are automatically published to npm when code is pushed to
mainordevelop - Automated Changelog: Release notes are automatically generated based on commit messages
- GitHub Releases: GitHub releases are automatically created with assets
This project uses Conventional Commits. Your commit messages should follow this format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: add new AI model support→ Minor version bumpfix: resolve configuration parsing issue→ Patch version bumpfeat!: change CLI interface→ Major version bump (breaking change)docs: update README→ No version bumpchore: update dependencies→ No version bump
feat→ Minor version bump (new feature)fix→ Patch version bump (bug fix)perf→ Patch version bump (performance improvement)
docs→ Documentation changesstyle→ Code style changesrefactor→ Code refactoringtest→ Test changeschore→ Maintenance tasks
- main: Production releases (e.g.,
1.0.0,1.1.0,1.1.1) - beta: Beta pre-releases (e.g.,
1.1.0-beta.1,1.1.0-beta.2) - alpha: Alpha pre-releases (e.g.,
1.1.0-alpha.1,1.1.0-alpha.2)
-
Alpha releases: Push to the
alphabranch for experimental featuresgit checkout -b alpha git push origin alpha
This will publish versions like
1.2.0-alpha.1 -
Beta releases: Push to the
betabranch for testing candidate releasesgit checkout -b beta git push origin beta
This will publish versions like
1.2.0-beta.1 -
Production releases: Merge to
mainfor stable releasesgit checkout main git merge beta # or alpha git push origin mainThis will publish versions like
1.2.0
Users can install pre-release versions using npm tags:
# Install latest alpha version
npm install @lucavb/aicommits@alpha
# Install latest beta version
npm install @lucavb/aicommits@beta
# Install specific pre-release version
npm install @lucavb/aicommits@1.2.0-alpha.1You can test releases locally:
# Dry run to see what would be released
npm run release:dry-run
# Actual release (only use if you know what you're doing)
npm run releaseFor automated publishing to work, you need to set up an NPM_TOKEN secret in your GitHub repository:
- Go to npmjs.com and log in
- Go to Access Tokens → Generate New Token
- Choose "Automation" token type (works with 2FA)
- Copy the token
- In your GitHub repository, go to Settings → Secrets and variables → Actions
- Add a new secret named
NPM_TOKENwith the token value
This project publishes with npm provenance enabled, which provides additional security and verification for published packages.