File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,10 +71,24 @@ echo "Publishing release: ${TAG} (pre-release=${PRERELEASE})"
7171
7272echo " Pushing ${TAG} to origin..."
7373if [ " $DRY_RUN " = " false" ]; then
74- git push origin HEAD:master
74+ if [ " $PRERELEASE " = " false" ]; then
75+ # Stable releases: push version bump commit to master.
76+ # Requires the user/bot to have branch protection bypass rights.
77+ git push origin HEAD:master
78+ else
79+ # Pre-releases: skip the branch push entirely.
80+ # The tag push (below) will carry the version-bump commit to GitHub
81+ # as an unreachable-from-branch object — that's fine for dev builds.
82+ # This avoids hitting branch protection rules in CI.
83+ echo " Skipping branch push for pre-release (branch protection safe)."
84+ fi
7585 git push origin " ${TAG} "
7686else
77- echo " [dry-run] git push origin HEAD:master"
87+ if [ " $PRERELEASE " = " false" ]; then
88+ echo " [dry-run] git push origin HEAD:master"
89+ else
90+ echo " [dry-run] Skipping branch push for pre-release"
91+ fi
7892 echo " [dry-run] git push origin ${TAG} "
7993fi
8094
You can’t perform that action at this time.
0 commit comments