Skip to content

Commit 29ef454

Browse files
author
zirain
authored
ci: setup action for cherrypick (#1312)
* 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]>
1 parent edb56fe commit 29ef454

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/cherrypick.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
types: ["closed"]
6+
7+
jobs:
8+
cherry_pick_release_v0_4:
9+
runs-on: ubuntu-latest
10+
name: Cherry pick into release-v0.4
11+
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v0.4') && github.event.pull_request.merged == true }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Cherry pick into release/v0.4
18+
uses: carloscastrojumo/[email protected]
19+
with:
20+
branch: release/v0.4
21+
title: "[release/v0.4] {old_title}"
22+
body: "Cherry picking #{old_pull_request_id} onto release/v0.4"
23+
labels: |
24+
cherrypick/release-v0.4
25+
# put release manager here
26+
reviewers: |
27+
AliceProxy
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/latest/dev/releasing.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,37 @@ export GITHUB_REMOTE=origin
6868
18. Ensure you check the "This is a pre-release" checkbox when editing the GitHub release.
6969
19. If you find any bugs in this process, please create an issue.
7070

71+
### Setup cherry picker action
72+
73+
After release branch cut, RM (Release Manager) should add job [cherrypick action](../../../.github/workflows/cherrypick.yaml) for target release.
74+
75+
Configuration looks like following:
76+
77+
```yaml
78+
cherry_pick_release_v0_4:
79+
runs-on: ubuntu-latest
80+
name: Cherry pick into release-v0.4
81+
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v0.4') && github.event.pull_request.merged == true }}
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v3
85+
with:
86+
fetch-depth: 0
87+
- name: Cherry pick into release/v0.4
88+
uses: carloscastrojumo/[email protected]
89+
with:
90+
branch: release/v0.4
91+
title: "[release/v0.4] {old_title}"
92+
body: "Cherry picking #{old_pull_request_id} onto release/v0.4"
93+
labels: |
94+
cherrypick/release-v0.4
95+
# put release manager here
96+
reviewers: |
97+
AliceProxy
98+
```
99+
100+
Replace `v0.4` with real branch name, and `AliceProxy` with the real name of RM.
101+
71102
## Minor Release
72103

73104
The following steps should be used for creating a minor release.

0 commit comments

Comments
 (0)