diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bec21ca..2c14853 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -4,7 +4,7 @@ run-name: "Release | ${{ github.ref_name }}" on: push: tags: - - 'v*' + - '*' jobs: release: @@ -40,26 +40,28 @@ jobs: id: releaseinfo run: | TAG="${{ github.ref_name }}" - VERSION="${TAG#v}" - case "$TAG" in - *-unstable*) - CHANNEL="unstable" - DRAFT="false" - PRERELEASE="true" - ;; - *-testing*) - CHANNEL="testing" - DRAFT="false" - PRERELEASE="true" - ;; - *) - CHANNEL="stable" - DRAFT="false" - PRERELEASE="false" - ;; - esac - + if [[ "$TAG" =~ ^t ]]; then + VERSION="${TAG#t}" + TAG="v${VERSION}-testing" + CHANNEL="testing" + DRAFT="false" + PRERELEASE="true" + elif [[ "$TAG" =~ ^u ]]; then + VERSION="${TAG#u}" + TAG="v${VERSION}-unstable" + CHANNEL="unstable" + DRAFT="false" + PRERELEASE="true" + else + # Falscheingaben als unstable behandeln + VERSION="${TAG#v}" + TAG="v${VERSION}-unstable" + CHANNEL="unstable" + DRAFT="false" + PRERELEASE="true" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT echo "channel=$CHANNEL" >> $GITHUB_OUTPUT echo "draft=$DRAFT" >> $GITHUB_OUTPUT