Releases & Versioning
Table of contents
We follow Semantic Versioning standard everywhere. Releases are 100% automated. See the github-workflows repository to see how it is done.
In a nutshell, given the following version format:
major.minor.patch
- The
majorversion is bumped when an incompatible API change is made - The
minorversion is bumped when backwards compatible features are added - The
patchversion is bumped when a backward compatible bug fix is made
Each repository either has one of two development dependencies that control the release process, @asteriidae/semantic-release-config-npm or @asteriidae/semantic-release-config-npm.
These provide reusable configurations that are inherited (referenced) in a local .releaserc file, for example:
// .releaserc
{
"extends": "@asteriidae/semantic-release-config-service"
}
Supporting Packages
All npm package versions are automatically bumped by the CI system as required, every time a new change is pushed to the main branch. The semantic-release tool determines the type of bump required based of the last git tag that was created from the main branch.
Example 1
If only commits starting with
fixare found, thepatchversion will be bumped. If the previous version published was1.0.0, the next version will be1.0.1.
Example 2
If commits starting with
featare found, theminorversion will be bumped. If the previous version published was1.0.0, the next version will be1.1.0.
Example 3
If only
chorecommits are found, no new version will be published as the changes should not affect consumers.
See the semantic-release-config-npm repository for more details.
Services
Services see a lot more activity than the supporting packages that they use. As such, a slightly different strategy is used. Changes committed to the main branch will result in a new beta version being published. New non-beta versions are created only when the main branch is synchronised with the prod branch, or if new commits are pushed to existing release branches i.e. branches that satisfy the following regex: +([0-9])?(.{+([0-9]),x}).x
Example 1
Both
fixandfeatcommits are pushed tomain. No non-beta releases have been created, the last beta release was1.0.0-beta2. The next version will be1.0.0-beta3.
Example 2
Both
fixandfeatcommits are pushed tomain. The latest non-beta release is1.3.4. The next version will be1.4.0-beta1.
See the semantic-release-config-service repository for more details.