@@ -106,31 +106,29 @@ jobs:
106106
107107 TAG="$VERSION"
108108
109- # echo "::group::Old release delete"
110- # RELEASE_ID=$(curl -s -H "Authorization: token $TOKEN" \
111- # https://api.github.com/repos/$REPO/releases/tags/$TAG)
112- #
113- # MESSAGE=$(echo "$RELEASE_ID" | jq -r '.message // empty')
114- # if [ "$MESSAGE" = "Not Found" ]; then
115- # echo "Release with tag $TAG not found"
116- # else
117- # RELEASE_ID =$(echo "RELEASE_ID" | jq -r '.id // empty')
118- #
119- # if [ "$RELEASE_ID" != "null" ]; then
120- # echo "Deleting release ID $RELEASE_ID"
121- # curl -s -X DELETE -H "Authorization: token $TOKEN" \
122- # https://api.github.com/repos/$REPO/releases/$RELEASE_ID
123- # fi
124- # fi
125- #
126- # echo "::endgroup::"
127- #
128- # echo "::group::Old tag delete"
129- # if git ls-remote --tags origin | grep -q "$TAG"; then
130- # git tag -d "$TAG" || true
131- # git push origin ":refs/tags/$TAG" || true
132- # fi
133- # echo "::endgroup::"
109+ #echo "::group::Old release delete"
110+ #RELEASE_ID=$(curl -s -H "Authorization: token $TOKEN" \
111+ # https://api.github.com/repos/$REPO/releases/tags/$TAG)
112+ #MESSAGE=$(echo "$RELEASE_ID" | jq -r '.message // empty')
113+ #if [ "$MESSAGE" = "Not Found" ]; then
114+ # echo "Release with tag $TAG not found"
115+ #else
116+ # RELEASE_ID =$(echo "RELEASE_ID" | jq -r '.id // empty')
117+ #
118+ # if [ "$RELEASE_ID" != "null" ]; then
119+ # echo "Deleting release ID $RELEASE_ID"
120+ # curl -s -X DELETE -H "Authorization: token $TOKEN" \
121+ # https://api.github.com/repos/$REPO/releases/$RELEASE_ID
122+ # fi
123+ #fi
124+ #echo "::endgroup::"
125+ #
126+ #echo "::group::Old tag delete"
127+ #if git ls-remote --tags origin | grep -q "$TAG"; then
128+ # git tag -d "$TAG" || true
129+ # git push origin ":refs/tags/$TAG" || true
130+ #fi
131+ #echo "::endgroup::"
134132
135133 echo "::group::New tag created"
136134 echo "tag=$TAG" >> $GITHUB_OUTPUT
0 commit comments