Skip to content

Commit 8e3bc51

Browse files
authored
Introduce release drafter (#713)
* Introduce release drafter * Target develop/main branches * Update README.md * Update README.md
1 parent 6ba76dd commit 8e3bc51

File tree

3 files changed

+89
-7
lines changed

3 files changed

+89
-7
lines changed

.github/release-drafter.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🔥 Breaking Changes'
5+
labels:
6+
- 'breaking'
7+
- title: '🚀 Features'
8+
labels:
9+
- 'feature'
10+
- 'enhancement'
11+
- title: '🐛 Bug Fixes'
12+
labels:
13+
- 'bug'
14+
- title: '👋 Deprecated'
15+
labels:
16+
- 'deprecation'
17+
- title: '🔗 Dependency Updates'
18+
labels:
19+
- 'library-update'
20+
- 'dependencies'
21+
- title: '🛠 Internal Updates'
22+
labels:
23+
- 'internal'
24+
- 'kaizen'
25+
- 'test-library-update'
26+
- 'sbt-plugin-update'
27+
- title: '📚 Docs'
28+
labels:
29+
- 'doc'
30+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
31+
32+
template: |
33+
## What's Changed
34+
35+
$CHANGES
36+
37+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
38+
39+
40+
autolabeler:
41+
- label: 'doc'
42+
files:
43+
- '*.md'
44+
- label: 'feature'
45+
title:
46+
- '/(support|add)/i'
47+
- label: 'bug'
48+
title:
49+
- '/fix/i'
50+
- label: 'internal'
51+
title:
52+
- '/internal/i'
53+
- label: 'deprecation'
54+
title:
55+
- '/deprecate/i'
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
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+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
update_release_draft:
21+
permissions:
22+
# write permission is required to create a github release
23+
contents: write
24+
# write permission is required for autolabeler
25+
# otherwise, read permission is required at least
26+
pull-requests: write
27+
runs-on: ubuntu-latest
28+
steps:
29+
# Drafts your next Release notes as Pull Requests are merged into "master"
30+
- uses: release-drafter/release-drafter@v5
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ Here is a list of sbt commands for daily development:
8282
> ~testOnly *MessagePackTest -- (pattern) # Run tests matching the pattern
8383
> project msgpack-core # Focus on a specific project
8484
> package # Create a jar file in the target folder of each project
85-
> findbugs # Produce findbugs report in target/findbugs
86-
> jacoco:cover # Report the code coverage of tests to target/jacoco folder
8785
> jcheckStyle # Run check style
88-
> ;scalafmt;test:scalafmt;scalafmtSbt # Reformat Scala codes
86+
> scalafmtAll # Reformat code
8987
```
9088

9189
### Publishing
@@ -105,10 +103,7 @@ $ git tag v0.x.y
105103
$ git push origin v0.x.y
106104
```
107105

108-
To generate a release notes, you can use this command line:
109-
```
110-
$ git log v(last version).. --oneline | cut -f 2- -d ' ' | perl -npe 's/(.*)\(\#([0-9]+)\)/* \1\[\#\2\]\(http:\/\/github.com\/msgpack\/msgpack-java\/pull\/\2\)/g'
111-
```
106+
A draft of the next release note will be updated automatically at the [GitHub Releases](https://github.com/msgpack/msgpack-java/releases) page. For each PR merged, [release-drafter](https://github.com/release-drafter/release-drafter) will modify the release note draft. When you create a new release tag, edit and publish the draft of the release note. If necessary, adjust the version number and target tag.
112107

113108
#### Publishing to Sonatype from Local Machine
114109

0 commit comments

Comments
 (0)