Skip to content

Commit e25c646

Browse files
Conditionally publish stable (#1314)
* Conditionally publish stable * Update .github/workflows/publish_stable.yml Co-authored-by: Austin Shalit <austinshalit@gmail.com> Co-authored-by: Austin Shalit <austinshalit@gmail.com>
1 parent e45c4d6 commit e25c646

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/publish_stable.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish Stable
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
workflow_dispatch:
77

88
jobs:
@@ -19,17 +19,20 @@ jobs:
1919
git config user.email github-actions@github.com
2020
git config pull.ff only
2121
22-
git fetch origin master
23-
(git checkout master && git pull) || git checkout -b master origin/master
22+
git fetch origin main
23+
(git checkout main && git pull) || git checkout -b main origin/main
2424
2525
git fetch origin stable
2626
(git checkout stable && git pull) || git checkout -b stable origin/stable
2727
28-
if git merge-base --is-ancestor master stable; then
28+
if git merge-base --is-ancestor main stable; then
2929
echo "No merge is necessary"
3030
exit 0
3131
fi;
3232
33-
git merge --ff-only master
33+
git merge --ff-only main
3434
35+
- name: Push
36+
if: ${{ env.PUBLISH_STABLE == 'True' }}
37+
run: |
3538
git push origin stable

0 commit comments

Comments
 (0)