Skip to content

Commit

Permalink
internal: Automatically generate release notes (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial authored Sep 24, 2023
1 parent ba1beab commit 3929eb3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
changelog:
categories:
- title: '🔥 Breaking Changes'
labels:
- 'breaking'
- title: '👋 Deprecated'
labels:
- 'deprecation'
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
- title: '🔗 Dependency Updates'
labels:
- 'library-update'
- 'dependencies'
- title: '🛠 Internal Updates'
labels:
- 'internal'
- 'kaizen'
- 'test-library-update'
- 'sbt-plugin-update'
- title: '📚 Docs'
labels:
- 'doc'
- title: Other Changes
labels:
- "*"
6 changes: 1 addition & 5 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Release Drafter

on:
push:
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
Expand All @@ -18,8 +15,7 @@ permissions:
jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
contents: read
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Note

on:
push:
tags:
- v*
workflow_dispatch:

jobs:
release:
name: Create a new release note
runs-on: ubuntu-latest
steps:
- name: Create a release note
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$GITHUB_REF_NAME" --repo="$GITHUB_REPOSITORY" --generate-notes
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ Here is a list of sbt commands for daily development:

### Publish to Sonatype (Maven Central)

To publish a new version, you only need to add a new git tag and push it to GitHub. GitHub Action will deploy a new release version to Maven Central (Sonatype).
To publish a new version, add a new git tag and push it to GitHub. GitHub Action will deploy a new release version to Maven Central (Sonatype).

```scala
$ git tag v0.x.y
$ git push origin v0.x.y
```

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.
A new release note will be generated automatically at the [GitHub Releases](https://github.com/msgpack/msgpack-java/releases) page.

#### Publishing to Sonatype from Local Machine

Expand Down

0 comments on commit 3929eb3

Please sign in to comment.