Files
UltraGrid/.github/scripts/create_continuous_release.sh
Martin Pulec 492f9b8351 create_continuous_release.sh: force fetch
It looks like git on GH tags without signatures first and thus the
consequent fetch in create_continuous_release.sh fails because it
fetches signed tag (although it is the same object).

See also:
https://github.com/MartinPulec/UltraGrid/actions/runs/2902280934

+ enable debugging in the script (`-x`)
2022-08-23 07:39:22 +02:00

19 lines
573 B
Bash
Executable File

#!/bin/sh -eux
#
# 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 -f
git tag continuous && git push origin refs/tags/continuous
curl -S -H "Authorization: token $GITHUB_TOKEN" -X POST "$URL" -T - <<EOF
{
"tag_name": "continuous"}
}
EOF