From 34dbb328bba9d7f7a292312e161c36547c4d8828 Mon Sep 17 00:00:00 2001 From: Marvin Schenkel Date: Fri, 8 Aug 2025 11:30:25 +0200 Subject: [PATCH] Fix backport workflow to filter out beta/rc tags (#2294) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/backport-to-stable.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" -- 2.34.1