File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 git log --oneline -1 @^0
5757 git log --oneline -1 @^0~
5858 ! git diff --exit-code @^0~ @^0 -- version.config
59+
60+ - name : The tagged release commit must belong to the corresponding release branch
61+ if : github.event.name == 'push'
62+ run : |
63+ version=$(sed -n "s/^version = //p" version.config)
64+ echo $version
65+
66+ branch=$(echo ${version} | sed 's/\([0-9]\+\.[0-9]\+\.\).*/\1x/')
67+ echo $branch
68+
69+ echo ${{ github.event.pull_request.base.ref }} | grep $branch
70+
71+ - name : The release PR must target the corresponding release branch
72+ if : github.event.name == 'pull_request'
73+ run : |
74+ version=$(sed -n "s/^version = //p" version.config)
75+ echo Version '$version'
76+
77+ branch=$(echo ${version} | sed 's/\([0-9]\+\.[0-9]\+\.\).*/\1x/')
78+ echo Expected branch '$branch'
79+
80+ git branch --contains @ | grep $branch
You can’t perform that action at this time.
0 commit comments