chore: automaticly mark as prerelease if necessary #19
@@ -147,8 +147,17 @@ jobs:
|
||||
# Release holen oder neu anlegen
|
||||
CODE=$(curl -sS -o release.json -w '%{http_code}' -H "$AUTH" "$API/releases/tags/$TAG")
|
||||
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" \
|
||||
'{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" \
|
||||
-d @payload.json "$API/releases" -o release.json
|
||||
elif [ "$CODE" != "200" ]; then
|
||||
|
||||
Reference in new issue
Block a user