File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : Merge release to network
2
2
3
3
on :
4
- push :
4
+ pull_request :
5
5
branches :
6
- - ' release/*'
6
+ - release/*
7
+ types :
8
+ - closed
7
9
8
10
env :
9
11
HEAD_BRANCH : ${{ github.head_ref || github.ref_name }}
10
-
12
+ RELEASE_BRANCH : ${{ github.event.pull_request.base.ref}}
11
13
permissions :
12
14
contents : write
13
15
pull-requests : write
14
16
15
17
jobs :
16
18
merge-release-to-network :
17
19
runs-on : ubuntu-latest
18
- if : ${{ contains (github.head_ref, 'release') }} || ${{ contains(github.ref_name , 'release ') }}
20
+ if : (github.event.pull_request.merged == true) && ( ${{ contains(github.head_ref , 'deploy ') }})
19
21
steps :
20
22
- name : Set Env
21
23
run : |
22
24
echo "PR_BRANCH=merge/${HEAD_BRANCH}" >> $GITHUB_ENV
23
- echo "VERSION=$(echo -n ${{ env.HEAD_BRANCH }} | sed 's/release \///' | cut -d'-' -f1)" >> $GITHUB_ENV
24
- echo "NETWORK=$(echo -n ${{ env.HEAD_BRANCH }} | sed 's/release \/v[0-9\.]*-\(.*\)/\1/')" >> $GITHUB_ENV
25
+ echo "VERSION=$(echo -n ${{ env.HEAD_BRANCH }} | sed 's/deploy \///' | cut -d'-' -f1)" >> $GITHUB_ENV
26
+ echo "NETWORK=$(echo -n ${{ env.HEAD_BRANCH }} | sed 's/deploy \/v[0-9\.]*-\(.*\)/\1/')" >> $GITHUB_ENV
25
27
26
28
- name : Set Mainnet Tag
27
29
if : ${{ env.NETWORK == 'mainnet' }}
51
53
delete-branch : true
52
54
title : ' chore(`${{ env.NETWORK }}`): merge from `${{ env.HEAD_BRANCH}}`'
53
55
body : ${{ steps.template.outputs.result }}
54
- branch : ${{env.PR_BRANCH}}
56
+ branch : ${{ env.PR_BRANCH }}
55
57
56
58
- name : Auto Merge
57
59
id : automerge
You can’t perform that action at this time.
0 commit comments