diff --git a/.github/scripts/create_continuous_release.sh b/.github/scripts/create_continuous_release.sh new file mode 100755 index 000000000..ec863b874 --- /dev/null +++ b/.github/scripts/create_continuous_release.sh @@ -0,0 +1,17 @@ +#!/bin/sh -eu +# +# Ensures that tag "continuous" is present is released on GH. This is required for +# zsync AppImage release asset. +# + +sudo apt install jq +URL=$(curl -S -H "Authorization: token $GITHUB_TOKEN" -X GET https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$TAG | jq -r '.url') +if [ $URL != null ]; then # release exists + exit 0 +fi +git fetch --prune --unshallow --tags +git tag continuous && git push origin refs/tags/continuous +curl -S -H "Authorization: token $GITHUB_TOKEN" -X POST $URL -T - <