mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 13:40:21 +00:00
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`)
19 lines
573 B
Bash
Executable File
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
|