Skip to content

Commit 55d9106

Browse files
authored
Adding the release drafter (#58)
The release drafter is used across Redis clients to provide a baseline for valuable release notes, across clients. The goal is not to replace the need to write release notes, but rather to provide a *consistent* basis, and baseline for those. As part of this, pull request **titles** upon merge to **master** become the comment in a release note. A merged pull request needs to have one of the labels below, thus inserting itself into the right place within the proposed, future release notes. In no way, does this negate a pull request appearing in multiple locations, nor enforce label requirements. The labels are as follows: bug - A pull request with this label will appear within the bugs section. feature - This label ensures the pull request is marked as a feature maintenance - Documentation changes, CI changes, and basically ongoing library maintenance work, belong here. breakingchange - Occasionally, we need to communicate with users, that a change breaks behaviour, or an API. By tagging accordingly, this appears at the top of the release notes. The action itself, is stored in the workflows folder, whereas the configuration (and hence template) for the github action appears in .github. The proposed configuration is a direct copy from redis-py, as these are used everywhere. Finally, as an example of well generated release notes, for larger changes please see [release 4.5.5](https://github.com/redis/redis-py/releases/tag/v4.5.5)
1 parent d2fe303 commit 55d9106

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.github/release-drafter-config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name-template: '$NEXT_MINOR_VERSION'
2+
tag-template: 'v$NEXT_MINOR_VERSION'
3+
autolabeler:
4+
- label: 'maintenance'
5+
files:
6+
- '*.md'
7+
- '.github/*'
8+
- label: 'bug'
9+
branch:
10+
- '/bug-.+'
11+
- label: 'maintenance'
12+
branch:
13+
- '/maintenance-.+'
14+
- label: 'feature'
15+
branch:
16+
- '/feature-.+'
17+
categories:
18+
- title: 'Breaking Changes'
19+
labels:
20+
- 'breakingchange'
21+
- title: '🧪 Experimental Features'
22+
labels:
23+
- 'experimental'
24+
- title: '🚀 New Features'
25+
labels:
26+
- 'feature'
27+
- 'enhancement'
28+
- title: '🐛 Bug Fixes'
29+
labels:
30+
- 'fix'
31+
- 'bugfix'
32+
- 'bug'
33+
- 'BUG'
34+
- title: '🧰 Maintenance'
35+
label: 'maintenance'
36+
change-template: '- $TITLE (#$NUMBER)'
37+
exclude-labels:
38+
- 'skip-changelog'
39+
template: |
40+
# Changes
41+
42+
$CHANGES
43+
44+
## Contributors
45+
We'd like to thank all the contributors who worked on this release!
46+
47+
$CONTRIBUTORS
48+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
permissions: {}
10+
jobs:
11+
update_release_draft:
12+
permissions:
13+
pull-requests: write # to add label to PR (release-drafter/release-drafter)
14+
contents: write # to create a github release (release-drafter/release-drafter)
15+
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Drafts your next Release notes as Pull Requests are merged into "master"
19+
- uses: release-drafter/release-drafter@v5
20+
with:
21+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
22+
config-name: release-drafter-config.yml
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)