From af94c60a649ae633cdb52a1a09622e1bbc641c90 Mon Sep 17 00:00:00 2001 From: Remco Vermeulen Date: Wed, 27 Mar 2024 14:19:43 -0700 Subject: [PATCH] Create unique branch to bump version Re-using the name will cause a reuse of an existing branch from previous releases. This will cause a failure when pushing the branch. Instead of force pushing we build up the history with unique branches. --- .github/workflows/finalize-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/finalize-release.yml b/.github/workflows/finalize-release.yml index ca91b249f5..56b150a702 100644 --- a/.github/workflows/finalize-release.yml +++ b/.github/workflows/finalize-release.yml @@ -109,14 +109,14 @@ jobs: git switch main git pull --ff-only origin main - git switch -c release-automation/bump-version + git switch -c "release-automation/bump-version-to-$NEXT_VERSION" # We are running the script in the tooling directory with the release directory as the working directory ../tooling/scripts/release/bump-version.sh "$NEXT_VERSION" git add -u . git commit -m "Bump version to $NEXT_VERSION" - git push --set-upstream origin release-automation/bump-version + git push --set-upstream origin "release-automation/bump-version-to-$NEXT_VERSION" - gh pr create --repo $GITHUB_REPOSITORY --base main --head release-automation/bump-version --body "Bump the version of main to $NEXT_VERSION" --title "Bump version to $NEXT_VERSION" + gh pr create --repo $GITHUB_REPOSITORY --base main --head "release-automation/bump-version-to-$NEXT_VERSION" --body "Bump the version of main to $NEXT_VERSION" --title "Bump version to $NEXT_VERSION" working-directory: release