This repository uses GitFlow for managing releases with GitHub Actions. This document explains the workflow and how to use it.
We follow the GitFlow branching model:
-
main: Production-ready code -
develop: Development branch where features are integrated -
feature/*: Feature branches for new development -
release/v*: Release branches for preparing new releases -
hotfix/*: Hotfix branches for urgent production fixes
This workflow runs automatically when pull requests are created or updated against the develop or main branches.
It performs:
- Linting
- Testing
- Building
This workflow is manually triggered to create a new release from the develop branch.
To start a release:
- Go to the "Actions" tab in GitHub
- Select the "Release Process" workflow
- Click "Run workflow"
- Optionally specify a version (if left empty, it will be determined from conventional commits)
- Choose whether to run in dry-run mode
The workflow will:
- Create a release branch from
develop - Update versions and generate changelogs
- Create a pull request to
main
This workflow runs automatically when a release pull request is merged to main.
It performs:
- Creating a GitHub release with the changelog
- Publishing packages to npm
- Merging changes back to
develop
- Create feature branches from
develop - Make changes and commit using conventional commit messages
- Create a PR to merge back to
develop - When ready to release, run the Release Process workflow
- Review the release PR and merge to
main - The Publish workflow will automatically run to publish packages
We use conventional commits to automatically determine version numbers and generate changelogs. Please follow this format for your commit messages:
-
feat: add new feature(triggers a minor version bump) -
fix: fix a bug(triggers a patch version bump) -
docs: update documentation(no version bump) -
chore: update dependencies(no version bump) -
BREAKING CHANGE: major change(triggers a major version bump)
If you need to manually specify a version instead of using conventional commits, you can provide the version when running the Release Process workflow.