From 8902db104adb65226e44edf8b64c8f017c209f1e Mon Sep 17 00:00:00 2001 From: Sergey Golovin Date: Thu, 3 Jun 2021 17:44:22 +0300 Subject: [PATCH] feat: add changelog auto-generation --- .github/workflows/changelog.yml | 25 +++++++++++++++++++++++++ .grenrc | 11 +++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/changelog.yml create mode 100644 .grenrc diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000..f30e03f6 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,25 @@ +name: changelog + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v1 + - name: Use Node.js 10 + uses: actions/setup-node@v1 + - name: Install github-release-notes and generate changelog + run: | + npx github-release-notes@0.17.1 changelog --generate --override --token=${{ secrets.CHANGELOG_TOKEN }} --changelog-filename=TEMP_CHANGELOG.md + env: + CI: true + - name: Create and publish realese + uses: ncipollo/release-action@v1 + with: + bodyFile: 'TEMP_CHANGELOG.md' + token: ${{ secrets.CHANGELOG_TOKEN }} diff --git a/.grenrc b/.grenrc new file mode 100644 index 00000000..d6773fdc --- /dev/null +++ b/.grenrc @@ -0,0 +1,11 @@ +{ + "dataSource": "commits", + "includeMessages": "commits", + "changelogFilename": "CHANGELOG.md", + "onlyMilestones": false, + "ignoreIssuesWith": [ + "wontfix", + "duplicate" + ] +} +