add some magic to merge to parent branch
This commit make it merge to parent branch instead of `master` branch, i.e. you are working on a branch called `refactor` and making a branch `release/2.0`, changes will be applied to `refactor` instead of `master`.
This commit is contained in:
parent
8500873387
commit
dd944cb5a5
1 changed files with 7 additions and 1 deletions
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
@ -94,7 +94,13 @@ jobs:
|
|||
|
||||
- name: Merge branch and push
|
||||
run: |
|
||||
git checkout master
|
||||
parent=$(git show-branch \
|
||||
| grep -F '*' \
|
||||
| grep -v "$(git rev-parse --abbrev-ref HEAD)" \
|
||||
| head -n1 \
|
||||
| sed 's/.*\[\(.*\)\].*/\1/' \
|
||||
| sed 's/[\^~].*//')
|
||||
git checkout ${parent}
|
||||
git merge release/${{ env.BUILDVER }} --allow-unrelated-histories
|
||||
git pull && git push && git push --tags
|
||||
|
||||
|
|
Loading…
Reference in a new issue