docs/SEMANTIC_RELEASE.md
This document explains how FossFLOW uses automated semantic versioning and releases.
FossFLOW uses semantic-release to automate:
When you commit code using conventional commits, the commit type determines the version bump:
| Commit Type | Version Bump | Example |
|---|---|---|
feat: | Minor (1.0.0 → 1.1.0) | New features |
fix: | Patch (1.0.0 → 1.0.1) | Bug fixes |
perf: | Patch (1.0.0 → 1.0.1) | Performance improvements |
refactor: | Patch (1.0.0 → 1.0.1) | Code refactoring |
feat!: or BREAKING CHANGE: | Major (1.0.0 → 2.0.0) | Breaking changes |
docs:, style:, test:, chore: | No bump | Non-code changes |
When you push to master branch:
.github/workflows/test.yml).github/workflows/release.yml)package.json files in all workspace packagesv1.2.0)[skip ci].github/workflows/docker.yml)latest1.2.0 (full version)1.2 (major.minor)1 (major only)FossFLOW is a monorepo with multiple packages. All packages are versioned together:
package.jsonpackages/fossflow-lib/package.jsonpackages/fossflow-app/package.jsonpackages/fossflow-backend/package.jsonThe scripts/update-version.js script syncs version numbers across all packages.
.releaserc.jsonMain semantic-release configuration:
master, main).github/workflows/release.ymlGitHub Actions workflow that:
GITHUB_TOKEN for GitHub API accessNPM_TOKEN for npm publishing (optional)scripts/update-version.jsNode.js script that updates version numbers in all package.json files simultaneously.
# Make your changes
git add .
git commit -m "feat(connector): add multi-point connector routing"
git push origin master
Result:
feat: commitv1.1.0 created1.1.0, 1.1, 1, latestgit commit -m "fix(export): resolve image export quality issue"
git push origin master
Result:
git commit -m "feat(api)!: redesign node creation API
BREAKING CHANGE: createNode() now requires nodeType parameter"
git push origin master
Result:
git commit -m "docs: update installation instructions"
git push origin master
Result:
You can test semantic-release locally without publishing:
# Dry run (no changes made)
npx semantic-release --dry-run
# See what version would be released
npx semantic-release --dry-run --no-ci
Check if:
feat, fix, etc.)master or main branchEnsure:
scripts/update-version.js has execute permissions.releaserc.json under @semantic-release/execVerify:
npm update semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/exec
Edit .releaserc.json under releaseRules to add custom commit type behaviors.
Edit .releaserc.json and .github/workflows/release.yml to target different branches.