From 746648bd6ee228e7ac5de0f5e99ecc8e95b4d64b Mon Sep 17 00:00:00 2001 From: Dmytro Soroka Date: Sun, 23 Nov 2025 19:36:44 +0100 Subject: [PATCH 1/2] Refine version bump validation and improve latest tag retrieval logic --- .github/workflows/workflow-compute-next-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow-compute-next-tag.yml b/.github/workflows/workflow-compute-next-tag.yml index 435bf1a..01f29e5 100644 --- a/.github/workflows/workflow-compute-next-tag.yml +++ b/.github/workflows/workflow-compute-next-tag.yml @@ -53,14 +53,14 @@ jobs: case "$version_bump" in major|minor|patch) ;; *) - echo "Unsupported version bump '$version_bump'." + echo "Unsupported version bump '$version_bump'." >&2 exit 1 ;; esac git fetch --tags - latest_tag=$(git tag --list 'v*' --sort=-v:refname | head -n1) + latest_tag=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -n1) if [ -z "$latest_tag" ]; then latest_tag="v0.0.0" fi From 7b841d854eb964f4574f3fc0142e178486a0bbb9 Mon Sep 17 00:00:00 2001 From: Dmytro Soroka Date: Sun, 23 Nov 2025 19:39:40 +0100 Subject: [PATCH 2/2] Refactor CI workflow to ensure linting is a prerequisite for auto-merging PRs --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d39f866..1cd9efd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,6 @@ jobs: determine_version: name: Detect version bump - needs: - - lint if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} uses: ./.github/workflows/workflow-determine-version-bump.yml with: @@ -58,8 +56,10 @@ jobs: merge_prs: name: Auto-merge PRs - needs: determine_version - if: ${{ needs.determine_version.result == 'success' && needs.determine_version.outputs.matching_pr == 'true' }} + needs: + - lint + - determine_version + if: ${{ needs.determine_version.result == 'success' && needs.determine_version.outputs.matching_pr == 'true' && needs.lint.result == 'success' }} uses: ./.github/workflows/workflow-merge-pull-requests.yml permissions: contents: write