Skip to content

Commit 3556b83

Browse files
author
strausr
committed
fix(release): ensure master branch exists for semantic-release validation
semantic-release requires at least one release branch that exists on the remote; repo only has main. Add step to create and push master from main when missing so ERELEASEBRANCHES is resolved.
1 parent 885eab9 commit 3556b83

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ jobs:
6161
git checkout -B main
6262
git branch --set-upstream-to=origin/main main
6363
64+
- name: Ensure master branch exists (for semantic-release validation)
65+
run: |
66+
# semantic-release requires at least one release branch that exists; repo uses main, we declare "master"
67+
if ! git ls-remote --heads origin master 2>/dev/null | grep -q .; then
68+
git checkout -b master
69+
git push origin master
70+
git checkout main
71+
fi
72+
6473
- uses: actions/setup-node@v4
6574
with:
6675
node-version: '20'

0 commit comments

Comments
 (0)