diff --git a/.gitea/workflows/parseVersion.yaml b/.gitea/workflows/parseVersion.yaml index 7bb72cc..448ed36 100644 --- a/.gitea/workflows/parseVersion.yaml +++ b/.gitea/workflows/parseVersion.yaml @@ -18,6 +18,9 @@ on: build: description: "Build number" value: ${{ jobs.parse.outputs.build }} + tag: + description: "Tag" + value: ${{ jobs.parse.outputs.tag }} releaseChannel: description: "The release channel" value: ${{ jobs.parse.outputs.releaseChannel }} @@ -38,18 +41,18 @@ jobs: steps: - id: parseStep run: | - input="${{ inputs.version }}" - input="${VERSION#refs/tags/}" + tag="${{ inputs.version }}" + tag="${VERSION#refs/tags/}" - if [[ "$input" == *"/"* ]]; then - releaseChannel=$(echo "$input" | cut -d'/' -f1) - version=$(echo "$input" | cut -d'/' -f2) + if [[ "$tag" == *"/"* ]]; then + releaseChannel=$(echo "$tag" | cut -d'/' -f1) + version=$(echo "$tag" | cut -d'/' -f2) else releaseChannel="beta" - version="$input" + version="$tag" fi - version=$(echo ${{ inputs.version }} | sed 's|.*/||') + version=$(echo "$tag" | sed 's|.*/||') IFS='.' read -r major minor patch build <<< "$version" @@ -64,6 +67,7 @@ jobs: echo "minor=$minor" >> $GITHUB_OUTPUT echo "patch=$patch" >> $GITHUB_OUTPUT echo "build=$build" >> $GITHUB_OUTPUT + echo "tag=$tag" >> $GITHUB_OUTPUT echo "releaseChannel=$releaseChannel" >> $GITHUB_OUTPUT echo "simpleVersion=$SIMPLE_VERSION" >> $GITHUB_OUTPUT echo "buildVersion=$BUILD_VERSION" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.gitea/workflows/updateRelease.yaml b/.gitea/workflows/updateRelease.yaml index 772c8fd..be77895 100644 --- a/.gitea/workflows/updateRelease.yaml +++ b/.gitea/workflows/updateRelease.yaml @@ -2,7 +2,7 @@ name: Update Release on: workflow_call: inputs: - version: + tag: required: true type: string milestoneName: @@ -35,17 +35,17 @@ jobs: # Fetch Release release=$(curl -s -H "Authorization: token $API_TOKEN" \ - "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/tags/${{ inputs.version }}") + "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/tags/${{ inputs.tag }}") # Extract the ID of the Release release_id=$(echo $release | jq -r '.id') if [ "$release_id" == "null" ]; then - echo "No release for tag '${{ inputs.version }}' found. Exiting." + echo "No release for tag '${{ inputs.tag }}' found. Exiting." exit 0 fi - echo "Found tag '${{ inputs.version }}' release with ID: $release_id" + echo "Found tag '${{ inputs.tag }}' release with ID: $release_id"