Implement Release Drafter.

This commit is contained in:
Fredrik Jonsson 2023-06-27 14:07:18 +02:00
commit 4b4cafb2fb
2 changed files with 69 additions and 0 deletions

40
.github/release-drafter.yaml vendored Normal file
View file

@ -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

29
.github/workflows/release-drafter.yaml vendored Normal file
View file

@ -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 }}