Skip to content

Commit bd2ea7a

Browse files
authored
Use Release Drafter to make releasing easier (#631)
1 parent 90162e4 commit bd2ea7a

File tree

5 files changed

+119
-12
lines changed

5 files changed

+119
-12
lines changed

.github/release-drafter.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
4+
categories:
5+
- title: "Added"
6+
labels:
7+
- "changelog: Added"
8+
- "enhancement"
9+
- title: "Changed"
10+
label: "changelog: Changed"
11+
- title: "Deprecated"
12+
label: "changelog: Deprecated"
13+
- title: "Removed"
14+
label: "changelog: Removed"
15+
- title: "Fixed"
16+
labels:
17+
- "changelog: Fixed"
18+
- "bug"
19+
- title: "Security"
20+
label: "changelog: Security"
21+
22+
exclude-labels:
23+
- "changelog: skip"
24+
25+
autolabeler:
26+
- label: "changelog: skip"
27+
branch:
28+
- "/pre-commit-ci-update-config/"
29+
30+
template: |
31+
$CHANGES
32+
33+
version-resolver:
34+
major:
35+
labels:
36+
- "changelog: Removed"
37+
minor:
38+
labels:
39+
- "changelog: Added"
40+
- "changelog: Changed"
41+
- "changelog: Deprecated"
42+
- "enhancement"
43+
44+
patch:
45+
labels:
46+
- "changelog: Fixed"
47+
- "bug"
48+
default: minor
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
# pull_request event is required only for autolabeler
9+
pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
# pull_request_target:
14+
# types: [opened, reopened, synchronize]
15+
workflow_dispatch:
16+
17+
jobs:
18+
update_release_draft:
19+
if: github.event.repository.fork == false
20+
permissions:
21+
# write permission is required to create a GitHub Release
22+
contents: write
23+
# write permission is required for autolabeler
24+
# otherwise, read permission is required at least
25+
pull-requests: write
26+
runs-on: ubuntu-latest
27+
steps:
28+
# Drafts your next release notes as pull requests are merged into "main"
29+
- uses: release-drafter/release-drafter@v6
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Require PR label
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, labeled, unlabeled, synchronize]
6+
7+
jobs:
8+
label:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: mheap/github-action-required-labels@v5
17+
with:
18+
mode: minimum
19+
count: 1
20+
labels: |
21+
changelog: Added
22+
changelog: Changed
23+
changelog: Deprecated
24+
changelog: Fixed
25+
changelog: Removed
26+
changelog: Security
27+
changelog: skip

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# History
22

3+
## 3.9.0 and newer
4+
5+
See GitHub Releases:
6+
7+
- https://github.com/jazzband/tablib/releases
8+
39
## 3.8.0 (2025-01-22)
410

511
### Improvements

RELEASING.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,17 @@
22

33
Jazzband guidelines: https://jazzband.co/about/releases
44

5-
* [ ] Get master to the appropriate code release state.
5+
* [ ] Get `master` to the appropriate code release state.
66
[GitHub Actions](https://github.com/jazzband/tablib/actions)
7-
should pass on master.
7+
should pass on `master`.
88
[![GitHub Actions status](https://github.com/jazzband/tablib/workflows/Test/badge.svg)](https://github.com/jazzband/tablib/actions)
99

10-
* [ ] Check [HISTORY.md](https://github.com/jazzband/tablib/blob/master/HISTORY.md),
11-
update version number and release date
10+
* [ ] Edit release draft, adjust text if needed:
11+
https://github.com/hugovk/em-keyboard/releases
1212

13-
* [ ] Create new GitHub release: https://github.com/jazzband/tablib/releases/new
14-
* Tag:
15-
* Click "Choose a tag"
16-
* Enter new tag: "v3.4.0"
17-
* Click "**Create new tag: v3.4.0** on publish"
18-
* Title: Leave blank, will be same as tag
19-
* Click "Generate release notes" and edit as required
20-
* Click "Publish release"
13+
* [ ] Check next tag is correct, amend if needed
14+
15+
* [ ] Publish release
2116

2217
* [ ] Once GitHub Actions has built and uploaded distributions, check files at
2318
[Jazzband](https://jazzband.co/projects/tablib) and release to

0 commit comments

Comments
 (0)