feat(github): Add changelog workflow config

This commit is contained in:
2023-05-22 16:09:16 +03:00
parent b259e4b992
commit 06c2686815
3 changed files with 34 additions and 0 deletions

32
.github/tag-changelog-config.js vendored Normal file
View File

@@ -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'
},
}

View File

@@ -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

1
.gitignore vendored
View File

@@ -8,4 +8,5 @@ config/fzf
config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/*
!.gitkeep
.env