This repository uses automated versioning and releases via GitHub Actions.
Triggers: Push to develop branch
Behavior:
- Creates beta/pre-release versions (e.g.,
v0.2.4-beta.1,v0.2.4-beta.2) - Only releases if there are version-bump commits (
feat:,fix:,perf:,refactor:, orBREAKING CHANGE:) - Publishes to GitHub Packages with
betatag - Skips release if only documentation or chore commits
Version Format:
- Beta releases:
v{version}-beta.{increment} - Example:
v0.2.4-beta.1→v0.2.4-beta.2
Triggers: Push to main branch
Behavior:
- Creates production releases (e.g.,
v0.2.4,v0.3.0) - Automatically determines version bump based on commit types:
feat:→ minor bump (0.2.3 → 0.3.0)fix:→ patch bump (0.2.3 → 0.2.4)BREAKING CHANGE:→ major bump (0.2.3 → 1.0.0)
- Only releases if there are version-bump commits
- Publishes to GitHub Packages with
latesttag - Creates GitHub Release with CHANGELOG.md content
Version Format:
- Production releases:
v{version} - Example:
v0.2.3→v0.2.4(patch) orv0.3.0(minor)
Both workflows follow this process:
- Checkout code with full git history
- Setup Bun runtime
- Install dependencies
- Build the project
- Lint the code
- Check for version-bump commits
- Create release:
- Bump version in
package.json - Update schema version in
schemas/sonarflowrc.schema.json($idfield) - Update
CHANGELOG.md - Create git tag
- Bump version in
- Push changes and tags to repository
- Publish to GitHub Packages
For automated releases to work, commits must follow Conventional Commits format:
Version-bump commits:
feat:- New features (minor bump)fix:- Bug fixes (patch bump)perf:- Performance improvements (patch bump)refactor:- Code refactoring (patch bump)BREAKING CHANGE:- Breaking changes (major bump)
Non-version-bump commits (skipped in release):
docs:- Documentation changeschore:- Build/tooling changesstyle:- Code style changestest:- Test changes
develop branch:
commit: "feat: add new feature"
→ GitHub Actions triggers
→ Creates v0.2.4-beta.1
→ Publishes to npm with 'beta' tag
main branch (merge from develop):
→ GitHub Actions triggers
→ Creates v0.2.4 (production)
→ Publishes to npm with 'latest' tag
→ Creates GitHub Release
Releases are automatically skipped if:
- No commits since last tag
- Only non-version-bump commits (docs, chore, style, test)
- No conventional commits detected
Beta version:
npm install @bitrockteam/sonarflow@betaProduction version:
npm install @bitrockteam/sonarflow@latest
# or
npm install @bitrockteam/sonarflowWorkflow not triggering:
- Ensure commits follow conventional format
- Check that changes are not in ignored paths
- Verify branch name matches (
developormain)
Version not bumping:
- Check commit messages match conventional format
- Verify there are version-bump commits since last tag
- Review workflow logs for specific errors
Publishing fails:
- Ensure
GITHUB_TOKENhaspackages:writepermission - Check that package name matches in
package.json - Verify
publishConfigis set correctly