From 3ee93bdc0d0890d1a9846a47f35ec35dcad7320e Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:22:12 +0100 Subject: [PATCH] Kennzeichnung stable/unstable/testing --- .gitea/workflows/release.yml | 42 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a9ad773..5add33b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,15 +40,29 @@ jobs: run: | TAG="${{ github.ref_name }}" VERSION="${TAG#v}" - + case "$TAG" in - *-unstable*) CHANNEL="unstable" ;; - *-testing*) CHANNEL="testing" ;; - *) CHANNEL="stable" ;; + *-unstable*) + CHANNEL="unstable" + DRAFT="false" + PRERELEASE="true" + ;; + *-testing*) + CHANNEL="testing" + DRAFT="true" + PRERELEASE="false" + ;; + *) + CHANNEL="stable" + DRAFT="false" + PRERELEASE="false" + ;; esac - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "channel=$CHANNEL" >> $GITHUB_OUTPUT + echo "draft=$DRAFT" >> $GITHUB_OUTPUT + echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT - name: plugin.info einlesen id: info @@ -147,10 +161,18 @@ jobs: API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases" JSON=$(jq -n \ - --arg tag "$TAG" \ - --arg name "Version $VERSION" \ - --arg body "${{ steps.changelog.outputs.current }}" \ - '{tag_name: $tag, name: $name, body: $body, draft: true, prerelease: true}') + --arg tag "$TAG" \ + --arg name "Version $VERSION" \ + --arg body "Automatisch erzeugtes Release für Kanal: $CHANNEL" \ + --argjson draft "${{ steps.releaseinfo.outputs.draft }}" \ + --argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \ + '{tag_name: $tag, name: $name, body: $body, draft: $draft, prerelease: $prerelease}') + + # JSON=$(jq -n \ + # --arg tag "$TAG" \ + # --arg name "Version $VERSION" \ + # --arg body "${{ steps.changelog.outputs.current }}" \ + # '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') API_RESPONSE=$(curl -s -X POST "$API_URL" \ -H "accept: application/json" \