From 4b4cafb2fb44bbdae60040f6926ab5fc802cdd62 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Tue, 27 Jun 2023 14:07:18 +0200 Subject: [PATCH] Implement Release Drafter. --- .github/release-drafter.yaml | 40 ++++++++++++++++++++++++++ .github/workflows/release-drafter.yaml | 29 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/release-drafter.yaml create mode 100644 .github/workflows/release-drafter.yaml diff --git a/.github/release-drafter.yaml b/.github/release-drafter.yaml new file mode 100644 index 0000000..0538678 --- /dev/null +++ b/.github/release-drafter.yaml @@ -0,0 +1,40 @@ +name-template: '$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: minor +categories: + - title: '🚀 Features' + labels: + - 'feature' + - title: '⚙️ Enhancements' + labels: + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🔧 Maintenance' + labels: + - 'dependencies' + - 'maintenance' + - title: '📜 Documentation' + labels: + - 'documentation' +template: | + ## Changes + + $CHANGES + + Contributors to this release: $CONTRIBUTORS + + **Full changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml new file mode 100644 index 0000000..75f3b3f --- /dev/null +++ b/.github/workflows/release-drafter.yaml @@ -0,0 +1,29 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + # pull_request event is required only for autolabeler + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + # write permission is required to create a github release + contents: write + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: write + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}