Skip to content

Commit

Permalink
Build: fix semantic-release commit tags
Browse files Browse the repository at this point in the history
  • Loading branch information
cbackas committed Jul 19, 2023
1 parent cb51064 commit a030b9f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
* @typedef {import('semantic-release').Options} Options
*/

const releaseRules = [
{ tag: 'Breaking', release: 'major' },
{ tag: 'Fix', release: 'patch' },
{ tag: 'Update', release: 'minor' },
{ tag: 'New', release: 'minor' },
{ tag: 'Build', release: 'patch' },
{ tag: 'Upgrade', release: 'patch' },
{ tag: 'Chore', release: 'patch' }
]

const noteKeywords = releaseRules.map(rule => rule.tag)
/** @type {Options} */

module.exports = {
branches: ['main'],
tagFormat: '${version}',
Expand All @@ -13,13 +25,17 @@ module.exports = {
[
'@semantic-release/commit-analyzer',
{
preset: 'eslint'
preset: 'eslint',
releaseRules
}
],
[
'@semantic-release/release-notes-generator',
{
preset: 'eslint'
preset: 'eslint',
parserOpts: {
noteKeywords
}
}
],
[
Expand Down

0 comments on commit a030b9f

Please sign in to comment.