diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 4fabec0..6f68a5a 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -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