UNPKG

@oriflame/semantic-release-config

Version:

Semantic release config used inside Oriflame and mainly focused on azure DevOps. With conventional [**Oriflame changelog**](../conventional-changelog).

83 lines (76 loc) 1.89 kB
'use strict'; /** * @copyright 2020, Oriflame Software * @license https://opensource.org/licenses/MIT */ /* eslint-disable no-template-curly-in-string -- Needed for semantic release */ // Get env variable from env let generateChangelog = process.env.GENERATE_CHANGELOG; if (typeof generateChangelog === 'string') { generateChangelog = generateChangelog.toLowerCase() === 'true'; } else { generateChangelog = Boolean(generateChangelog); } const config = { plugins: [['@semantic-release/commit-analyzer', { config: '@oriflame/conventional-changelog', releaseRules: [{ type: 'break', release: 'major' }, { type: 'breaking', release: 'major' }, { type: 'release', release: 'major' }, { type: 'new', release: 'minor' }, { type: 'update', release: 'minor' }, { type: 'feature', release: 'minor' }, { type: 'fix', release: 'patch' }, { type: 'deps', release: 'patch' }, { type: 'docs', release: 'patch' }, { type: 'revert', release: 'patch' }, { type: 'style', release: 'patch' }, { type: 'styles', release: 'patch' }, { type: 'security', release: 'patch' }, { type: 'type', release: 'patch' }, { type: 'types', release: 'patch' }, { type: 'misc', release: 'patch' }] }], ['@semantic-release/release-notes-generator', { config: '@oriflame/conventional-changelog' }], '@semantic-release/npm'] }; // Add changelog and git plugin when generate changelog is enabled if (generateChangelog) { config.plugins?.push('@semantic-release/changelog', ['@semantic-release/git', { message: 'internal(release): V${nextRelease.version} [ci skip].' }]); } module.exports = config; //# sourceMappingURL=index2.js.map