From dbe05eab330069971143ced2552fcdf6de0acba7 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 22 Aug 2022 11:02:00 +0200 Subject: [PATCH] create_continuous_release.sh: other fixes - fetch really 'continuous' release, not $TAG (perhaps c&p error from create_release.sh) - create tag only if not exists --- .github/scripts/create_continuous_release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/create_continuous_release.sh b/.github/scripts/create_continuous_release.sh index 576a456d1..090665de0 100755 --- a/.github/scripts/create_continuous_release.sh +++ b/.github/scripts/create_continuous_release.sh @@ -5,12 +5,14 @@ # 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') +URL=$(curl -S -H "Authorization: token $GITHUB_TOKEN" -X GET "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/continuous" | 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 +if git tag continuous; then # tag may or may not exists + git push origin refs/tags/continuous +fi curl -S -H "Authorization: token $GITHUB_TOKEN" -X POST "$URL" -T - <