Merge pull request 'chore: automaticly mark as prerelease if necessary' (#19) from chore into main

Reviewed-on: Schanbro/WeekFocus#19
This commit is contained in:
robin committed 2026-10-06 15:19:59 +00:00
commit ff78c71ab5
1 file changed
+10 -1
+10 -1
View File
@@ -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