mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 22:40:18 +00:00
GitHub CI: create continuous release if needed
For Linux AppImages in release channel, zsync files are stored as an artefact in continuous release assets so ensure that it is present.
This commit is contained in:
17
.github/scripts/create_continuous_release.sh
vendored
Executable file
17
.github/scripts/create_continuous_release.sh
vendored
Executable file
@@ -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 - <<EOF
|
||||
{
|
||||
"tag_name": "continuous"}
|
||||
}
|
||||
3
.github/workflows/ccpp.yml
vendored
3
.github/workflows/ccpp.yml
vendored
@@ -49,6 +49,9 @@ jobs:
|
||||
- name: Update Release
|
||||
if: (github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
|
||||
run: .github/scripts/create_release.sh
|
||||
- name: Create continuous release # ensure continuous release is present for AppImage zsync
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: .github/scripts/create_continuous_release.sh
|
||||
|
||||
Ubuntu:
|
||||
name: run Ubuntu
|
||||
|
||||
Reference in New Issue
Block a user