From e0cca519b55beb2166b241bca01fe64146dc4a58 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Tue, 27 Jan 2026 10:59:21 +0100 Subject: [PATCH] fix(ci): extract version number from PR title The workflow was using the full PR title (e.g., 'Release 3.2.1') as the version string, causing Docker tags and release creation to fail. Now extracts just the version number (X.Y.Z or X.Y.Z-suffix) from the PR title, handling formats like 'Release 3.2.1', 'v3.2.1', or '3.2.1'. --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce100352..6d3e9b3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,7 +98,14 @@ jobs: run: | if [ '${{ github.event_name }}' == 'pull_request' ]; then if [ ${{ github.event.pull_request.merged }} == true ]; then - echo "version=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT + # Extract version from PR title (handles "Release X.Y.Z", "vX.Y.Z", or "X.Y.Z") + PR_TITLE="${{ github.event.pull_request.title }}" + VERSION=$(echo "$PR_TITLE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?' | head -1) + if [ -n "$VERSION" ]; then + echo "version=$VERSION" >> $GITHUB_OUTPUT + else + echo "version=$PR_TITLE" >> $GITHUB_OUTPUT + fi fi elif [[ ${{ github.event_name }} == 'push' && (${{ github.ref }} == *'alpha'* || ${{ github.ref }} == *'beta'*) ]]; then echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT