Korrektur der Version- und Channel-Bestimmung für Suffixe
This commit is contained in:
@@ -4,7 +4,7 @@ run-name: "Release | ${{ github.ref_name }}"
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -41,28 +41,46 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
TAG="${{ github.ref_name }}"
|
TAG="${{ github.ref_name }}"
|
||||||
|
|
||||||
if [[ "$TAG" =~ ^v ]]; then
|
case "$TAG" in
|
||||||
VERSION="${TAG#v}"
|
*-unstable*)
|
||||||
CHANNEL="stable"
|
VERSION="${TAG%-unstable}"
|
||||||
DRAFT="false"
|
VERSION="${VERSION#v}"
|
||||||
PRERELEASE="false"
|
CHANNEL="unstable"
|
||||||
elif [[ "$TAG" =~ ^t ]]; then
|
DRAFT="false"
|
||||||
VERSION="${TAG#t}"
|
PRERELEASE="true"
|
||||||
CHANNEL="testing"
|
;;
|
||||||
DRAFT="false"
|
*-testing*)
|
||||||
PRERELEASE="true"
|
VERSION="${TAG%-testing}"
|
||||||
elif [[ "$TAG" =~ ^u ]]; then
|
VERSION="${VERSION#v}"
|
||||||
VERSION="${TAG#u}"
|
CHANNEL="testing"
|
||||||
CHANNEL="unstable"
|
DRAFT="false"
|
||||||
DRAFT="false"
|
PRERELEASE="true"
|
||||||
PRERELEASE="true"
|
;;
|
||||||
else
|
v*)
|
||||||
# Fallback für andere Prefixe, z.B. x26.3.1 -> 26.3.1-unstable
|
VERSION="${TAG#v}"
|
||||||
VERSION="${TAG#?}"
|
CHANNEL="stable"
|
||||||
CHANNEL="unstable"
|
DRAFT="false"
|
||||||
DRAFT="false"
|
PRERELEASE="false"
|
||||||
PRERELEASE="true"
|
;;
|
||||||
fi
|
t*)
|
||||||
|
VERSION="${TAG#t}"
|
||||||
|
CHANNEL="testing"
|
||||||
|
DRAFT="false"
|
||||||
|
PRERELEASE="true"
|
||||||
|
;;
|
||||||
|
u*)
|
||||||
|
VERSION="${TAG#u}"
|
||||||
|
CHANNEL="unstable"
|
||||||
|
DRAFT="false"
|
||||||
|
PRERELEASE="true"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
VERSION="${TAG#?}"
|
||||||
|
CHANNEL="unstable"
|
||||||
|
DRAFT="false"
|
||||||
|
PRERELEASE="true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "channel=$CHANNEL" >> $GITHUB_OUTPUT
|
echo "channel=$CHANNEL" >> $GITHUB_OUTPUT
|
||||||
@@ -175,15 +193,9 @@ jobs:
|
|||||||
|
|
||||||
API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases"
|
API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases"
|
||||||
|
|
||||||
if [[ "$CHANNEL" == "stable" ]]; then
|
|
||||||
RELEASE_NAME="$VERSION"
|
|
||||||
else
|
|
||||||
RELEASE_NAME="$VERSION-$CHANNEL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
JSON=$(jq -n \
|
JSON=$(jq -n \
|
||||||
--arg tag "$TAG" \
|
--arg tag "$TAG" \
|
||||||
--arg name "$RELEASE_NAME" \
|
--arg name "Version $VERSION" \
|
||||||
--arg body "${{ steps.changelog.outputs.current }}" \
|
--arg body "${{ steps.changelog.outputs.current }}" \
|
||||||
--argjson draft "${{ steps.releaseinfo.outputs.draft }}" \
|
--argjson draft "${{ steps.releaseinfo.outputs.draft }}" \
|
||||||
--argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \
|
--argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user