From 92f204e005e1533d38fcd9d0df81d022926d54f1 Mon Sep 17 00:00:00 2001 From: Takumi Kadowaki Date: Wed, 5 Jun 2024 00:06:12 +0900 Subject: [PATCH] chore: Add Release Drafter (#38) --- .github/release-drafter.yml | 37 +++++++++++++++++++++++++++ .github/workflows/auto-labeler.yml | 17 ++++++++++++ .github/workflows/release-drafter.yml | 21 +++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/auto-labeler.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..fc591d6 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,37 @@ +commitish: main +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +autolabeler: + - label: 'feature' + title: + - '/^feat/i' + - label: 'fix' + title: + - '/^fix/i' + - label: 'docs' + title: + - '/^docs/i' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - title: '🐛 Fixes' + labels: + - 'fix' + - title: '📚 Documents' + labels: + - 'docs' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + minor: + labels: + - 'feature' + patch: + labels: + - 'fix' + default: patch +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/auto-labeler.yml b/.github/workflows/auto-labeler.yml new file mode 100644 index 0000000..ac6210e --- /dev/null +++ b/.github/workflows/auto-labeler.yml @@ -0,0 +1,17 @@ +name: Auto Labeler + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +jobs: + update_pr_labels: + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + with: + disable-releaser: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..1c3c7a8 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,21 @@ +name: Release Drafter + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + with: + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}