From: Marvin Schenkel Date: Fri, 8 Aug 2025 09:30:25 +0000 (+0200) Subject: Fix backport workflow to filter out beta/rc tags (#2294) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=34dbb328bba9d7f7a292312e161c36547c4d8828;p=music-assistant-server.git Fix backport workflow to filter out beta/rc tags (#2294) The workflow was failing because it selected beta tags (e.g., 2.6.0b3) instead of stable tags (e.g., 2.5.5) when calculating the next patch version. Now filters tags to only match stable version format. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- diff --git a/.github/workflows/backport-to-stable.yml b/.github/workflows/backport-to-stable.yml index 5c461c85..8e1e768d 100644 --- a/.github/workflows/backport-to-stable.yml +++ b/.github/workflows/backport-to-stable.yml @@ -63,12 +63,13 @@ jobs: id: nextver run: | git fetch origin stable --tags - latest_tag=$(git tag --merged origin/stable --sort=-v:refname | head -1) + # Filter out beta/rc tags and get only stable versions (e.g., 2.5.5, v2.5.5) + latest_tag=$(git tag --merged origin/stable --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' | head -1) if [[ -z "$latest_tag" ]]; then - echo "No tags found on stable branch" >&2 + echo "No stable tags found on stable branch" >&2 exit 1 fi - echo "Latest tag: $latest_tag" + echo "Latest stable tag: $latest_tag" # Remove 'v' prefix if present version="$latest_tag"