Skip to content

Commit 4e34ed1

Browse files
Adding logic to delete pre-existing prerelase
1 parent 0d123bc commit 4e34ed1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/stage-3-build.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ jobs:
9393
PRERELEASE_FLAG=""
9494
[[ "$IS_PRERELEASE" == "true" ]] && PRERELEASE_FLAG="--prerelease"
9595
96-
# Create the release if it doesn't exist. If it does, ignore the error.
96+
# Pre-releases are recreated on every push so the git tag always points
97+
# to the current commit (raw.githubusercontent.com uses the tag as a ref).
98+
if [[ "$IS_PRERELEASE" == "true" ]]; then
99+
gh release delete "$VERSION" --yes 2>/dev/null || true
100+
fi
101+
97102
gh release create "$VERSION" \
98103
--title "$VERSION" \
99104
$PRERELEASE_FLAG \

0 commit comments

Comments
 (0)