Skip to content

Commit

Permalink
fix: use conventionalcommits in semantic-release
Browse files Browse the repository at this point in the history
Fix an assumption around how semantic-release would interpret commit types by using the
conventionalcommits preset.
  • Loading branch information
Eli Skeggs committed Nov 1, 2019
1 parent 349e33c commit 6b980f8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
6 changes: 6 additions & 0 deletions config/conventionalcommits-release-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = [
{
type: 'improvement',
release: 'patch',
},
];
15 changes: 13 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
releaseRules: './config/conventionalcommits-release-rules.js',
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
},
],
'@semantic-release/github',
'@semantic-release/npm',
'@semantic-release/changelog',
Expand Down
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "The shared configuration we use for `semantic-release`.",
"main": "index.js",
"files": [
"index.js"
"index.js",
"config"
],
"scripts": {
"ci": "npm run lint",
Expand Down Expand Up @@ -38,6 +39,7 @@
"@commitlint/config-conventional": "^8.2.0",
"@mixmaxhq/commitlint-jenkins": "^1.2.1",
"@mixmaxhq/prettier-config": "^1.0.0",
"conventional-changelog-conventionalcommits": "^4.2.1",
"cz-conventional-changelog": "^3.0.2",
"eslint": "^6.6.0",
"eslint-config-mixmax": "^3.4.0",
Expand Down

0 comments on commit 6b980f8

Please sign in to comment.