Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions release-rules.js

This file was deleted.

42 changes: 35 additions & 7 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
module.exports = {
// Commit types appear in the changelog in this order
const commitTypes = [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'perf', section: 'Performance Improvements' },
{ type: 'revert', section: 'Reversions' },
{ type: 'refactor', section: 'Code Refactoring' },
{ type: 'docs', section: 'Documentation' },
{ type: 'test', section: 'Testing' },
{ type: 'style', section: 'Style Changes' },
{ type: 'ci', section: 'Continuous Integration' },
{ type: 'build', section: 'Build System' },
{ type: 'chore', section: 'Maintenance' }
]

// Default rules can be found in `github.com/semantic-release/commit-analyzer/lib/default-release-rules.js`
// that cover feat, fix, perf and breaking.
// Commit types defined above but without release rules do not trigger a release
// but will be incorporated into the next release.
// NOTE: Any changes to commit types or release rules must be reflected in `CONTRIBUTING.rst`.
const releaseRules = [
{ type: 'docs', release: 'patch' },
{ type: 'refactor', release: 'patch' },
{ type: 'revert', release: 'patch' },
{ type: 'style', release: 'patch' },
{ type: 'test', release: 'patch' }
]

const config = {
// TODO: remove this when we no longer process releases on GitLab CI
repositoryUrl: 'https://github.com/saltstack-formulas/template-formula',
plugins: [
['@semantic-release/commit-analyzer', {
preset: 'angular',
releaseRules: './release-rules.js'
}],
['@semantic-release/commit-analyzer', { releaseRules }],
'@semantic-release/release-notes-generator',
['@semantic-release/changelog', {
changelogFile: 'CHANGELOG.md',
Expand All @@ -20,7 +45,10 @@ module.exports = {
}],
'@semantic-release/github'
],
generateNotes: {
preset: 'angular'
preset: 'conventionalcommits',
presetConfig: {
types: commitTypes
}
}

module.exports = config
Loading