From c6d6ac359b8b987ea7197b20b0367cdaf13fb624 Mon Sep 17 00:00:00 2001 From: Robin Schanbacher Date: Tue, 6 Oct 2026 15:19:44 +0000 Subject: [PATCH] chore: automaticly mark as prerelease if necessary --- .gitea/workflows/release.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.54.1