replace old release if it is still a draft

This commit is contained in:
Carson McManus 2021-08-25 12:18:27 -04:00
parent e9ca3f6a42
commit 26184d5544

View file

@ -57,6 +57,9 @@ RAW_VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)"
VERSION="v$RAW_VERSION"
if [[ $DRY_RUN == false ]]; then
if [[ $(gh release list | grep -i "Draft" | grep -i "$VERSION" && echo "true" || echo "false") == "true" ]]; then
gh release delete --yes "$VERSION"
fi
gh release create "$VERSION" --title "$VERSION" --draft "$BIN_PATH" "./steamguard-cli_$RAW_VERSION-0.deb"
fi