@droplt/semantic-release-config v1.1.0
Semantic-release shareable config for droplt.
Workflow
This shareable configuration use the conventional-changelog-conventionalcommits
preset (conventional commits).
See the list of commits types and their impact on version bump, changelog generation and release trigger.
Commit Type | Trigger release | Version Bump | Changelog Section | Changelog Visibility |
---|---|---|---|---|
build | ✅ | patch (v0.0.1) | Build System | ❌ |
ci | ✅ | patch (v0.0.1) | Continuous Integration | ❌ |
chore | ❌ | - | Miscellaneous Chores | ❌ |
docs | ❌ | - | Documentation | ❌ |
feat | ✅ | minor (v0.1.0) | Features | ✅ |
fix | ✅ | patch (v0.0.1) | Bug Fixes | ✅ |
perf | ✅ | patch (v0.0.1) | Performance Improvements | ✅ |
refactor | ❌ | - | Code Refactoring | ❌ |
revert | ❌ | - | Reverts | ✅ |
style | ❌ | - | Styles | ❌ |
test | ❌ | - | Tests | ❌ |
A special behavior for BREAKING CHANGE
commits:
Commit | Trigger release | Version Bump | Changelog Section | Changelog Visibility |
---|---|---|---|---|
chore(scope)!: commit message | ✅ | major (v1.0.0) | ⚠️ BREAKING CHANGES | ✅ |
perf(scope): commit message BREAKING CHANGE: breaking message | ✅ | major (v1.0.0) | ⚠️ BREAKING CHANGES | ✅ |
Plugins
This shareable configuration comes with the following plugins installed:
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/npm
@semantic-release/github
@semantic-release/exec
See each documentation for required installation and configuration steps.
Install
yarn add semantic-release @droplt/semantic-release-config -D
Usage
The shareable config can be configured via the semantic-release configuration file:
- A
.releaserc
file, written in YAML or JSON, with optional extensions:.yaml
/.yml
/.json
/.js
- A
release.config.js
file that exports an object - A
release
key in the project'spackage.json
file
// release.config.js
module.exports = {
"extends": "@droplt/semantic-release-config"
}
// package.json
{
...
"release": {
"extends": "@droplt/semantic-release-config"
}
}
Using a release.config.js
allow you to customize the default configuration:
const config = require('@droplt/semantic-release-config')
module.exports = {
...config,
plugins: [
...config.plugins,
'add_your_plugin_here',
...
],
}
Examples
Run NPM script before release
Using the pre-installed @semantic-release/exec
plugin, you can run a custom NPM script before the release process.
// release.config.js
const config = require('@droplt/semantic-release-config')
module.exports = {
...config,
plugins: [
...config.plugins,
['@semantic-release/exec', {
prepareCmd: 'yarn build',
}],
],
}
Refer to
@semantic-release/exec
documentation for lifecycle hooks.