Skip to content

Commit 2073a92

Browse files
authored
Allow re-running prepare release branch workflow (#347)
This change removes the check that prevents re-running the prepare release branch workflow when the release branch already exists. Instead, it adds fetch-depth: 0 to get full history, which allows the workflow to fast-forward push the release branch when re-running after merging additional PRs to main.
1 parent a855cdc commit 2073a92

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/prepare-release-branch.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ jobs:
3131
- prereqs
3232
steps:
3333
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
with:
35+
# history is needed to allow fast-forward push below in case
36+
# re-running this workflow after merging additional PRs to main
37+
fetch-depth: 0
3438

3539
- name: Create release branch
3640
run: |
3741
version=$(.github/scripts/get-version.sh)
3842
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
3943
release_branch_name="release/v${version}"
40-
release_branch_exists=$(git ls-remote --heads origin refs/heads/$release_branch_name)
41-
if [[ $release_branch_exists != "" ]] ; then
42-
echo "release branch $release_branch_name already exists"
43-
exit 1
44-
fi
4544
else
4645
echo "unexpected version: $version"
4746
exit 1

0 commit comments

Comments
 (0)