Skip to content

Commit

Permalink
ci: setup action for cherrypick (#1312)
Browse files Browse the repository at this point in the history
* ci: setup action for cherrypick

Signed-off-by: hejianpeng <[email protected]>

* update doc

Signed-off-by: hejianpeng <[email protected]>

* fix link

Signed-off-by: hejianpeng <[email protected]>

* fix lint

Signed-off-by: hejianpeng <[email protected]>

---------

Signed-off-by: hejianpeng <[email protected]>
  • Loading branch information
zirain authored Apr 25, 2023
1 parent edb56fe commit 29ef454
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cherrypick.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
31 changes: 31 additions & 0 deletions docs/latest/dev/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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.
Expand Down

0 comments on commit 29ef454

Please sign in to comment.