Skip to content

Commit e72aa47

Browse files
authored
Update release.yml
1 parent dbae344 commit e72aa47

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,25 @@ jobs:
104104
body: ${{ steps.changelog_reader.outputs.changes }}
105105
draft: false
106106
prerelease: ${{ env.NBGV_PublicRelease == 'False' }}
107-
108-
- name: ⏩ Merge stable with main, push main
107+
108+
- name: ☑ Check if merge of stable to main is possible
109+
shell: bash
109110
continue-on-error: true
111+
run: |
112+
git checkout main
113+
git merge --no-commit --no-ff stable
114+
echo echo "CAN_MERGE_STABLE_WITH_MAIN=$($? == 0)" >> $GITHUB_ENV
115+
git merge --abort
116+
117+
- name: ⏩ Merge stable with main, push main
118+
if: ${{ env.CAN_MERGE_STABLE_WITH_MAIN == true }}
110119
run: |
111120
git checkout main
112121
git merge -S stable
113122
git push origin main
114123
115124
- name: ⏭ Create pull request from stable to main
116-
if: ${{ failure() }}
125+
if: ${{ env.CAN_MERGE_STABLE_WITH_MAIN == false }}
117126
uses: thomaseizinger/[email protected]
118127
env:
119128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)