From a030b9faf2a6660c7ea41f86db2266706e0e4581 Mon Sep 17 00:00:00 2001 From: cbackas Date: Wed, 19 Jul 2023 13:57:27 -0500 Subject: [PATCH] Build: fix semantic-release commit tags --- release.config.cjs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/release.config.cjs b/release.config.cjs index 74f0dad..0110032 100644 --- a/release.config.cjs +++ b/release.config.cjs @@ -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}', @@ -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 + } } ], [