Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

Commit

Permalink
ci(configuration): add changelog conf on tag workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Aug 14, 2023
1 parent fd814a9 commit 84a65b9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/tag-changelog.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
types: [
{ types: ["feat", "feature"], label: "🎉 New Features" },
{ types: ["fix", "bugfix"], 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"], label: "💅 Code Style Changes" },
{ types: ["chore"], label: "🧹 Chores" },
{ types: ["other"], label: "Other Changes" },
],

excludeTypes: ["other", "chore"],

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().substr(0, 10)}\n` + changes + "\n\n";
},
};
2 changes: 1 addition & 1 deletion .github/workflows/tag-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: loopwerk/tag-changelog@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_types: other,doc
config_file: .github/tag-changelog.cjs

- name: Create release
uses: actions/create-release@latest
Expand Down

0 comments on commit 84a65b9

Please sign in to comment.