From bdf66b48aae5b50d08bbe2072bea3bd99c40cf09 Mon Sep 17 00:00:00 2001 From: ppodds Date: Mon, 4 Sep 2023 22:47:03 +0800 Subject: [PATCH] chore: add relno config --- .github/release-template.rntmd | 25 +++++++++++++++++++++++++ relno.config.js | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/release-template.rntmd create mode 100644 relno.config.js diff --git a/.github/release-template.rntmd b/.github/release-template.rntmd new file mode 100644 index 0000000..f2fcbda --- /dev/null +++ b/.github/release-template.rntmd @@ -0,0 +1,25 @@ +## 📝 Changelog + +[compare changes]({{ compareUrl }}) + + + +### {{ title }} + + + +- {{ prSubtype }}{{ generateIfNotEmpty(prSubtype, ": ") }}{{ toSentence(message) }} (#{{ prNumber }}) + + + + + +### {{ title }} + + + +- {{ prSubtype }}{{ generateIfNotEmpty(prSubtype, ": ") }}{{ generateIf(prBreaking, "⚠️ ") }}{{ toSentence(message) }} (#{{ prNumber }}) + + + + \ No newline at end of file diff --git a/relno.config.js b/relno.config.js new file mode 100644 index 0000000..61c4f00 --- /dev/null +++ b/relno.config.js @@ -0,0 +1,18 @@ +module.exports = { + template: '.github/release-template.rntmd', + prTypes: [ + { + identifier: 'breaking', + title: '⚠️ Breaking Changes', + filter: (_, commit) => + commit.message.match(/([^()\n!]+)(?:\(.*\))?!: .+ \(#[1-9][0-9]*\)/) !== + null, + }, + { identifier: 'feat', title: '🚀 Enhancements' }, + { identifier: 'fix', title: '🩹 Fixes' }, + { identifier: 'docs', title: '📖 Documentation' }, + { identifier: 'chore', title: '🏡 Chore' }, + { identifier: 'refactor', title: '💅 Refactors' }, + { identifier: 'test', title: '✅ Tests' }, + ], +};