From 481f4f3a7eaefab69289d22b0dd4365c4f7a0dc1 Mon Sep 17 00:00:00 2001 From: chrismclarke Date: Sun, 6 Nov 2022 14:22:49 -0800 Subject: [PATCH] ci: add release drafter --- .github/release-drafter.yml | 16 ++++++++++++++++ .github/workflows/release-drafter.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 000000000..ba1c951d6 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,16 @@ +categories: + - title: '๐Ÿš€ Features' + labels: + - 'feature' + - 'enhancement' + - title: '๐Ÿ› Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '๐Ÿงฐ Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +template: | + ## Whatโ€™s Changed + $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000..2550fefcd --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,26 @@ +# Automatically draft release notes based on any pull requests made to main +name: Release Drafter +on: + push: + branches: + - main +jobs: + update_release_draft: + runs-on: ubuntu-latest + env: + APP_VERSION: '0.0.0' + steps: + # Extract current version number from package.json and set it as the APP_VERSION env variable + - name: checkout + uses: actions/checkout@main + - name: set_version + run: echo "APP_VERSION=$(echo "$(cat package.json | jq -r '.version')")" >> $GITHUB_ENV + - name: check_version + run: echo "version $env.APP_VERSION" + # Drafts your next Release notes as Pull Requests are merged into "main" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + name: v${{env.APP_VERSION}} + tag: v${{env.APP_VERSION}}