This project uses semantic-release to automatically manage versioning and publishing of the @finos/calm-cli package.
- Automated Versioning: Version numbers are automatically determined based on the semantic meaning of commits
- Manual Release Control: Releases are triggered manually when you're ready to publish
- Changelog Generation: A changelog is automatically generated and maintained
- GitHub Releases: GitHub releases are automatically created with release notes
This project follows the Conventional Commits specification. All commit messages should be structured as follows:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- feat: A new feature (triggers a minor release)
- fix: A bug fix (triggers a patch release)
- docs: Documentation only changes (triggers a patch release)
- style: Changes that do not affect the meaning of the code (triggers a patch release)
- refactor: A code change that neither fixes a bug nor adds a feature (triggers a patch release)
- perf: A code change that improves performance (triggers a patch release)
- test: Adding missing tests or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- chore: Other changes that don't modify src or test files
To trigger a major release, include BREAKING CHANGE: in the commit footer or add a ! after the type:
feat!: remove deprecated API endpoints
BREAKING CHANGE: The old v1 API endpoints have been removed
Available scopes include:
cli: Changes specific to the CLI packageshared: Changes to shared utilitiescalm: Changes to the CALM speccalm-widgets: Changes to the widgets packagecalm-hub: Changes to the hub backendcalm-hub-ui: Changes to the hub frontenddocs: Changes to documentationworkspace: Changes affecting the entire workspace
To help create properly formatted commits, you can use commitizen:
npm run commitThis will prompt you through creating a conventional commit message.
Every pull request automatically validates that all commit messages follow the conventional commit format:
- Automatic Checks: When you open or update a PR, all commit messages are validated
- Status Checks: PRs with invalid commit messages will fail the validation check
- Helpful Feedback: The bot will comment on your PR with specific guidance if commits need fixing
- Examples Provided: Get clear examples of proper commit message format
- Scope Validation: Ensures you're using valid scopes for this project
If your commit messages don't follow the conventional format:
- The PR check will fail
- A bot will comment with detailed guidance
- You can fix commits using
git rebase -ito edit messages - Or squash and create new commits with proper formatting
- Use
npm run commitfor guided commit creation
- Make your changes
- Use
npm run commitor write a conventional commit message manually - Push to a feature branch and create a PR
- Automatic Validation: The PR will automatically validate all commit messages
- Status Checks: The PR validation must pass before merging
- Helpful Comments: Get feedback if commit messages need fixing
- When you're ready to release:
- Go to the GitHub Actions tab in the repository
- Run the "Release and Publish CLI" workflow manually
- The workflow will:
- Analyze the commits since the last release to determine the version bump
- Update the version in
cli/package.json - Generate/update the
cli/CHANGELOG.md - Create a Git tag
- Publish to NPM
- Create a GitHub release