From 03011bc51235df6c987140d26b795227c84f995d Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sun, 11 Dec 2022 18:31:32 +0800 Subject: [PATCH] chore: add release-drafter action --- .github/release-drafter.yml | 80 ++++++++++++++++++++++++++ .github/workflows/release-drafter.yaml | 41 +++++++++++++ README.md | 2 +- README_ZH.md | 2 +- 4 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yaml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..7896e67 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,80 @@ +name-template: Ants v$RESOLVED_VERSION +tag-template: v$RESOLVED_VERSION +categories: + - title: ๐Ÿงจ Breaking changes + labels: + - breaking changes + - title: ๐Ÿš€ Features + labels: + - proposal + - new feature + - title: ๐Ÿ›ฉ Enhancements + labels: + - enhancement + - optimization + - title: ๐Ÿ› Bugfixes + labels: + - bug + - title: ๐Ÿ“š Documentation + labels: + - doc + - docs + - title: ๐Ÿ—ƒ Misc + labels: + - chores +change-template: '- $TITLE (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + major: + labels: + - major + minor: + labels: + - minor + - new feature + - proposal + patch: + labels: + - patch + - bug + - dependencies + default: patch +autolabeler: + - label: bug + title: + - /fix/i + - /bug/i + - label: docs + files: + - '*.md' + title: + - /doc/i + - /README/i + - label: enhancement + title: + - /opt:/i + - /refactor/i + - /optimize/i + - /improve/i + - /update/i + - /remove/i + - /delete/i + - label: new feature + title: + - /feat:/i + - /feature/i + - /implement/i + - /add/i + - label: dependencies + title: + - /dependencies/i + - /upgrade/i + - /bump up/i +template: | + ## Changelogs + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + + Thanks to all these contributors: $CONTRIBUTORS for making this release possible. diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml new file mode 100644 index 0000000..36e3b5e --- /dev/null +++ b/.github/workflows/release-drafter.yaml @@ -0,0 +1,41 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + 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 + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: write + runs-on: ubuntu-latest + steps: + # (Optional) GitHub Enterprise requires GHE_HOST variable set + #- name: Set GHE_HOST + # run: | + # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV + + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index a3e8b2a..bf53a95 100644 --- a/README.md +++ b/README.md @@ -376,7 +376,7 @@ Become a bronze sponsor with a monthly donation of $10 and get your logo on our ## ๐Ÿ’ต Patrons -Patrick Othmer Jimmy ChenZhen Mai Yang ็Ž‹ๅผ€ๅธ… Unger Alejandro Weng Wei +Patrick Othmer Jimmy ChenZhen Mai Yang ็Ž‹ๅผ€ๅธ… Unger Alejandro Weng Wei ## ๐Ÿ”‹ Sponsorship diff --git a/README_ZH.md b/README_ZH.md index 68babaa..2163fbe 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -377,7 +377,7 @@ pool.Reboot() ## ่ต„ๅŠฉ่€… -Patrick Othmer Jimmy ChenZhen Mai Yang ็Ž‹ๅผ€ๅธ… Unger Alejandro Weng Wei +Patrick Othmer Jimmy ChenZhen Mai Yang ็Ž‹ๅผ€ๅธ… Unger Alejandro Weng Wei ## ๐Ÿ”‹ ่ตžๅŠฉๅ•†