From 3f862b58cbe518b162cab2ca414a7d4ebc9bbab8 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Sat, 25 Apr 2026 11:33:25 +0100 Subject: [PATCH] ci: Fix unstable builds for repo packages --- .forgejo/workflows/build-debian.yml | 2 +- .forgejo/workflows/build-fedora.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-debian.yml b/.forgejo/workflows/build-debian.yml index e7833b948..f4fe193a9 100644 --- a/.forgejo/workflows/build-debian.yml +++ b/.forgejo/workflows/build-debian.yml @@ -96,7 +96,7 @@ jobs: if [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9]$ ]]; then # Use the "stable" component for tagged semver releases COMPONENT="stable" - elif [[ ${{ forge.ref }} =~ ^refs/tags/^v+[0-9]\.+[0-9]\.+[0-9] ]]; then + elif [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9] ]]; then # Use the "unstable" component for tagged semver pre-releases COMPONENT="unstable" else diff --git a/.forgejo/workflows/build-fedora.yml b/.forgejo/workflows/build-fedora.yml index 589a9cb74..6beec186a 100644 --- a/.forgejo/workflows/build-fedora.yml +++ b/.forgejo/workflows/build-fedora.yml @@ -105,7 +105,7 @@ jobs: RELEASE_SUFFIX="" TAG_NAME="${{ github.ref_name }}" # Extract version from tag (remove v prefix if present) - TAG_VERSION=$(echo "$TAG_NAME" | sed 's/^v//') + TAG_VERSION=$(echo "$TAG_NAME" | sed 's/^v//' | tr '-' '~') # Create spec file with tag version sed -e "s/^Version:.*$/Version: $TAG_VERSION/" \ @@ -270,9 +270,13 @@ jobs: # Determine the group based on ref type and branch if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then - GROUP="stable" # For tags, extract the tag name for version info TAG_NAME="${{ github.ref_name }}" + if [[ "$TAG_NAME" == *"-"* ]]; then + GROUP="unstable" + else + GROUP="stable" + fi elif [ "${{ github.ref_name }}" = "main" ]; then GROUP="dev" else