diff --git a/.github/tag-changelog-config.js b/.github/tag-changelog-config.js new file mode 100644 index 0000000..d982339 --- /dev/null +++ b/.github/tag-changelog-config.js @@ -0,0 +1,32 @@ +module.exports = { + types: [ + { types: ['feat', 'feature', 'Feat'], label: '๐ŸŽ‰ New Features' }, + { types: ['fix', 'bugfix', 'Fix'], label: '๐Ÿ› Bugfixes' }, + { types: ['improvements', 'enhancement'], label: '๐Ÿ”จ Improvements' }, + { types: ['perf'], label: '๐ŸŽ๏ธ Performance Improvements' }, + { types: ['build', 'ci'], label: '๐Ÿ—๏ธ Build System' }, + { types: ['refactor'], label: '๐Ÿชš Refactors' }, + { types: ['doc', 'docs'], label: '๐Ÿ“š Documentation Changes' }, + { types: ['test', 'tests'], label: '๐Ÿ” Tests' }, + { types: ['style', 'codestyle'], label: '๐Ÿ’… Code Style Changes' }, + { types: ['chore', 'Chore'], label: '๐Ÿงน Chores' }, + { types: ['other', 'Other'], label: 'Other Changes' }, + ], + + excludeTypes: ['other'], + + renderTypeSection: function (label, commits) { + let text = `\n## ${ label }\n` + + commits.forEach((commit) => { + text += `- ${ commit.subject }\n` + }) + + return text + }, + + renderChangelog: function (release, changes) { + const now = new Date() + return `# ${ release } - ${ now.toISOString().substring(0, 10) }\n` + changes + '\n\n' + }, +} diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 5f96927..d503821 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,6 +15,7 @@ jobs: uses: loopwerk/tag-changelog@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + config_file: .github/tag-changelog-config.js - name: "Echo results" id: output-changelog diff --git a/.gitignore b/.gitignore index d9fcde0..53120a7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ config/fzf config/cheat/cheatsheets/pure-bash-bible/* config/cheat/cheatsheets/tldr/* !.gitkeep +.env