diff --git a/.github/commitlint.config.js b/.github/commitlint.config.js new file mode 100644 index 00000000..ce2de8fa --- /dev/null +++ b/.github/commitlint.config.js @@ -0,0 +1,24 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + 'minor', + 'release' + ] + ] + } +}; diff --git a/.releaserc b/.releaserc index fd2796cc..0fb21b2c 100644 --- a/.releaserc +++ b/.releaserc @@ -8,7 +8,25 @@ ], "repositoryUrl": "https://github.com/camunda/camunda-8-js-sdk.git", "plugins": [ - "@semantic-release/commit-analyzer", + [ + "@semantic-release/commit-analyzer", + { + "releaseRules": [ + { + "type": "feat", + "release": "patch" + }, + { + "type": "release", + "release": "patch" + }, + { + "type": "minor", + "release": "minor" + } + ] + } + ], "@semantic-release/release-notes-generator", "@semantic-release/changelog", [ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0e8433b..3a8766ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,9 +19,9 @@ To get started with contributing, please follow these steps: ## A note on commit messages -The repository uses []`semantic-release`](https://github.com/semantic-release/semantic-release) to create releases. Because we track the Camunda 8 Platform minor version, we need to treat feature implementation during a minor release cycle as a `fix` rather than a `feature`. +The repository uses []`semantic-release`](https://github.com/semantic-release/semantic-release) to create releases. Because we track the Camunda 8 Platform minor version, we treat feature implementation during a minor release cycle as a patch release rather than a minor release. -Creating a commit with a `feature` commit message will cause the package version minor release number to increment, which we only do when Camunda 8 Platform releases a new minor version. +Creating a commit with a `feat` commit message will cause the package version patch release number to increment. To update the minor version, a commit with the type `minor` is needed. ## Running tests diff --git a/README.md b/README.md index 8d4822fd..b6a7cc7c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is the official Camunda 8 JavaScript SDK. It is written in TypeScript and runs on Node.js. See details on why [this is not in a web browser](https://github.com/camunda/camunda-8-js-sdk/issues/79)). -# What does "supported" mean? +## What does "supported" mean? This is the official supported-by-Camunda Nodejs SDK for Camunda Platform 8. @@ -12,6 +12,10 @@ The Node.js SDK will not always support all features of Camunda Platform 8 immed Prioritisation of implementing features is influenced by customer demand. +## Semantic versioning + +The SDK package tracks Camunda Platform 8 minor versioning. Feature releases to support current Platform minor version features result in a patch release of the SDK. + ## Using the SDK in your project Install the SDK as a dependency: diff --git a/commitlint.config.js b/commitlint.config.js index 5a9bf016..678ea2b1 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,3 +1,25 @@ +// eslint-disable-next-line no-undef module.exports = { - extends: ['@commitlint/config-conventional'], - }; \ No newline at end of file + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + 'release', // force a new patch release regardless of the commit message + 'minor', // create a new minor release to match the Camunda Platform version + ], + ], + }, +}