From 695cf53a8cf67b36e65789becea5e13e17ab11f5 Mon Sep 17 00:00:00 2001 From: priyankarpal <88102392+priyankarpal@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:08:11 +0530 Subject: [PATCH 1/3] feat(ci): add release-drafter ci/cd github action for automatic releases #1455 --- .github/release-drafter.yml | 30 +++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 24 +++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/release-drafter.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 0000000000..b7237be29c --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,30 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - '✨ goal: improvement' + - title: '🐛 Bug Fixes' + labels: + - '🛠 goal: fix' + - title: '🧰 Maintenance' + labels: + - 'chore' + - '🛠 goal: refactor' +change-template: '- $TITLE @$AUTHOR (#$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' + patch: + labels: + - 'patch' + default: patch +template: | + ## Changes + + $CHANGES \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000000..f522f5ad04 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,24 @@ +name: Release Drafter + +on: + push: + branches: + - main + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + # write permission is required to create a github release + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From aff22882d5cfb075f284ba46de9931cfbc4cfa1a Mon Sep 17 00:00:00 2001 From: priyankarpal <88102392+priyankarpal@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:27:20 +0530 Subject: [PATCH 2/3] chore: added another label --- .github/release-drafter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index b7237be29c..c8cbc081dd 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -4,6 +4,7 @@ categories: - title: '🚀 Features' labels: - '✨ goal: improvement' + - '⭐ goal: addition' - title: '🐛 Bug Fixes' labels: - '🛠 goal: fix' From a19d673ba4010385b6cd21999f35cd249999311f Mon Sep 17 00:00:00 2001 From: priyankarpal <88102392+priyankarpal@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:35:01 +0530 Subject: [PATCH 3/3] chore: added required code --- .github/workflows/release-drafter.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f522f5ad04..439cae130b 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,11 +2,16 @@ name: Release Drafter on: push: + # branches to consider in the event; optional, defaults to all 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 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 @@ -16,9 +21,21 @@ jobs: 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