Skip to content

Commit 546c40c

Browse files
committed
fix: ensure clean release branch creation by deleting existing branches from previous runs
1 parent 10a9e2a commit 546c40c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ jobs:
278278
VERSION="${{ steps.version.outputs.next }}"
279279
BRANCH="release/v${VERSION}"
280280
281+
# Delete branch if it already exists (from previous failed runs)
282+
git push origin --delete "$BRANCH" 2>/dev/null || true
283+
git branch -D "$BRANCH" 2>/dev/null || true
284+
281285
# Create and switch to release branch
282286
git config user.name "github-actions[bot]"
283287
git config user.email "github-actions[bot]@users.noreply.github.com"

0 commit comments

Comments
 (0)