From 9125550505f17f4f88c23c3bd02c35484521be58 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Tue, 16 May 2023 10:37:10 -0700 Subject: [PATCH] Automate release note genreation (#400) * Use release-drafter only for PR labeling * Remove release note config * Generate a new release note with a new tag --- .github/release-drafter.yml | 39 --------------------------- .github/release.yml | 31 +++++++++++++++++++++ .github/workflows/release-drafter.yml | 12 ++------- .github/workflows/release-note.yml | 18 +++++++++++++ ReleaseNotes.md | 2 ++ 5 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 .github/release.yml create mode 100644 .github/workflows/release-note.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 7d0f2698..9fc74c80 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,42 +1,3 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' -categories: - - title: '🔥 Breaking Changes' - labels: - - 'breaking' - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'bug' - - title: '👋 Deprecated' - labels: - - 'deprecation' - - title: '🔗 Dependency Updates' - labels: - - 'library-update' - - 'dependencies' - - title: '🛠 Internal Updates' - labels: - - 'internal' - - 'kaizen' - - 'test-library-update' - - 'sbt-plugin-update' - - title: '📚 Docs' - labels: - - 'doc' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' - -template: | - ## What's Changed - - $CHANGES - - **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION - - autolabeler: - label: 'doc' files: diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..973c3db6 --- /dev/null +++ b/.github/release.yml @@ -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: + - "*" diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 7daff30e..4522d07c 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,31 +1,23 @@ name: Release Drafter on: - push: - branches: - - master # 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] - # pull_request_target event is required for autolabeler to support PRs from forks - pull_request_target: - types: [opened, reopened, synchronize] - + permissions: contents: read 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 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 }} diff --git a/.github/workflows/release-note.yml b/.github/workflows/release-note.yml new file mode 100644 index 00000000..dc17b65d --- /dev/null +++ b/.github/workflows/release-note.yml @@ -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 diff --git a/ReleaseNotes.md b/ReleaseNotes.md index ed3863e8..56be465f 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,8 @@ Release Notes === +See [the release note page](https://github.com/xerial/sbt-sonatype/releases) for the latest release notes. + # 3.9.14 - Upgraded airframe-http to 22.11.0