mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 21:40:15 +00:00
For Linux AppImages in release channel, zsync files are stored as an artefact in continuous release assets so ensure that it is present.
18 lines
559 B
Bash
Executable File
18 lines
559 B
Bash
Executable File
#!/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 - <<EOF
|
|
{
|
|
"tag_name": "continuous"}
|
|
}
|