fix(ci): fetch the release branch after creating it in prepare-release (#13050)

This commit is contained in:
César Arroba Vico authored and GitHub committed 2026-10-15 11:23:57 +02:00
1 parent 9b56a3b657
commit 7c4b12b655
1 file changed
+2 -1
+2 -1
View File
@@ -117,7 +117,8 @@ jobs:
fi
echo "Branch $BRANCH_NAME does not exist, creating it from master ($MASTER_SHA)..."
gh api --method POST "repos/${GITHUB_REPOSITORY}/git/refs" -f ref="refs/heads/${BRANCH_NAME}" -f sha="${MASTER_SHA}"
git checkout -b "$BRANCH_NAME" "$MASTER_SHA"
git fetch origin "+refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}"
git checkout -b "$BRANCH_NAME" "origin/$BRANCH_NAME"
else
echo "ERROR: Branch $BRANCH_NAME does not exist. For patch releases (X.Y.Z), the branch should already exist."
exit 1