From 29ef454755812260ca946d75e5bc0da9b4167112 Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 25 Apr 2023 10:28:38 +0800 Subject: [PATCH] ci: setup action for cherrypick (#1312) * ci: setup action for cherrypick Signed-off-by: hejianpeng * update doc Signed-off-by: hejianpeng * fix link Signed-off-by: hejianpeng * fix lint Signed-off-by: hejianpeng --------- Signed-off-by: hejianpeng --- .github/workflows/cherrypick.yaml | 29 +++++++++++++++++++++++++++++ docs/latest/dev/releasing.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/cherrypick.yaml diff --git a/.github/workflows/cherrypick.yaml b/.github/workflows/cherrypick.yaml new file mode 100644 index 00000000000..eebd8737ddf --- /dev/null +++ b/.github/workflows/cherrypick.yaml @@ -0,0 +1,29 @@ +on: + pull_request: + branches: + - main + types: ["closed"] + +jobs: + cherry_pick_release_v0_4: + runs-on: ubuntu-latest + name: Cherry pick into release-v0.4 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v0.4') && github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cherry pick into release/v0.4 + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + branch: release/v0.4 + title: "[release/v0.4] {old_title}" + body: "Cherry picking #{old_pull_request_id} onto release/v0.4" + labels: | + cherrypick/release-v0.4 + # put release manager here + reviewers: | + AliceProxy +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/latest/dev/releasing.md b/docs/latest/dev/releasing.md index 9c1406e5dab..81625698cfa 100644 --- a/docs/latest/dev/releasing.md +++ b/docs/latest/dev/releasing.md @@ -68,6 +68,37 @@ export GITHUB_REMOTE=origin 18. Ensure you check the "This is a pre-release" checkbox when editing the GitHub release. 19. If you find any bugs in this process, please create an issue. +### Setup cherry picker action + +After release branch cut, RM (Release Manager) should add job [cherrypick action](../../../.github/workflows/cherrypick.yaml) for target release. + +Configuration looks like following: + +```yaml + cherry_pick_release_v0_4: + runs-on: ubuntu-latest + name: Cherry pick into release-v0.4 + if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v0.4') && github.event.pull_request.merged == true }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Cherry pick into release/v0.4 + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + branch: release/v0.4 + title: "[release/v0.4] {old_title}" + body: "Cherry picking #{old_pull_request_id} onto release/v0.4" + labels: | + cherrypick/release-v0.4 + # put release manager here + reviewers: | + AliceProxy +``` + +Replace `v0.4` with real branch name, and `AliceProxy` with the real name of RM. + ## Minor Release The following steps should be used for creating a minor release.