diff --git a/.github/workflows/config.grenrc.js b/.github/workflows/config.grenrc.js new file mode 100644 index 0000000..c604bae --- /dev/null +++ b/.github/workflows/config.grenrc.js @@ -0,0 +1,17 @@ +module.exports = { + dataSource: 'milestones', + ignoreIssuesWith: [ + 'wontfix', + 'duplicate' + ], + milestoneMatch: 'v{{tag_name}}', + template: { + issue: '- {{name}} [{{text}}]({{url}})', + changelogTitle: "## Release notes\n\n", + release: "{{body}}", + }, + groupBy: { + 'Enhancements:': ["enhancement", "internal"], + 'Bug fixes:': ["bug"] + } +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24cd0bd..94b9272 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,11 +25,19 @@ jobs: cd dist zip -9 -r dist.zip . -x "js/*.map" + - name: Create Release Notes + run: | + npm install github-release-notes@0.16.0 -g + gren changelog --generate --config="/.github/workflows/config.grenrc.js" + env: + GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create release uses: ncipollo/release-action@v1 with: artifacts: "dist/dist.zip" token: ${{ secrets.GITHUB_TOKEN }} + bodyFile: "CHANGELOG.md" - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@4.1.1