chore: automaticly mark as prerelease if necessary
This commit is contained in:
1 parent
8cacb6f582
commit
c6d6ac359b
1 file changed
+10
-1
@@ -147,8 +147,17 @@ jobs:
|
|||||||
# Release holen oder neu anlegen
|
# Release holen oder neu anlegen
|
||||||
CODE=$(curl -sS -o release.json -w '%{http_code}' -H "$AUTH" "$API/releases/tags/$TAG")
|
CODE=$(curl -sS -o release.json -w '%{http_code}' -H "$AUTH" "$API/releases/tags/$TAG")
|
||||||
if [ "$CODE" = "404" ]; then
|
if [ "$CODE" = "404" ]; then
|
||||||
|
# Nach VERSION="${GITHUB_REF_NAME#v}" hinzufügen:
|
||||||
|
if [[ "$VERSION" =~ (alpha|beta|rc|dev) ]]; then
|
||||||
|
IS_PRERELEASE="true"
|
||||||
|
else
|
||||||
|
IS_PRERELEASE="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dann beim jq-Aufruf:
|
||||||
jq -n --arg tag "$TAG" --arg name "$TAG" --rawfile body "$NOTES_FILE" \
|
jq -n --arg tag "$TAG" --arg name "$TAG" --rawfile body "$NOTES_FILE" \
|
||||||
'{tag_name:$tag, name:$name, body:$body}' > payload.json
|
--argjson prerelease "$IS_PRERELEASE" \
|
||||||
|
'{tag_name:$tag, name:$name, body:$body, prerelease:$prerelease}' > payload.json
|
||||||
curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \
|
curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \
|
||||||
-d @payload.json "$API/releases" -o release.json
|
-d @payload.json "$API/releases" -o release.json
|
||||||
elif [ "$CODE" != "200" ]; then
|
elif [ "$CODE" != "200" ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user