From 6efd31229aad51ee208ebcf39fcbd4b84e689d09 Mon Sep 17 00:00:00 2001 From: Michael Legleux Date: Thu, 19 Mar 2026 03:23:51 -0700 Subject: [PATCH] fix: Use correct format and event for workflows for release tags (#6554) --- .github/actions/generate-version/action.yml | 4 ++-- .github/workflows/on-tag.yml | 2 +- .github/workflows/reusable-upload-recipe.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/generate-version/action.yml b/.github/actions/generate-version/action.yml index 6b84aac2f3..8edb7920c6 100644 --- a/.github/actions/generate-version/action.yml +++ b/.github/actions/generate-version/action.yml @@ -11,7 +11,7 @@ runs: steps: # When a tag is pushed, the version is used as-is. - name: Generate version for tag event - if: ${{ github.event_name == 'tag' }} + if: ${{ startsWith(github.ref, 'refs/tags/') }} shell: bash env: VERSION: ${{ github.ref_name }} @@ -22,7 +22,7 @@ runs: # We use a plus sign instead of a hyphen because Conan recipe versions do # not support two hyphens. - name: Generate version for non-tag event - if: ${{ github.event_name != 'tag' }} + if: ${{ !startsWith(github.ref, 'refs/tags/') }} shell: bash run: | echo 'Extracting version from BuildInfo.cpp.' diff --git a/.github/workflows/on-tag.yml b/.github/workflows/on-tag.yml index af3ea4309e..e570a0e119 100644 --- a/.github/workflows/on-tag.yml +++ b/.github/workflows/on-tag.yml @@ -5,7 +5,7 @@ name: Tag on: push: tags: - - "v*" + - "[0-9]+.[0-9]+.[0-9]*" concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/reusable-upload-recipe.yml b/.github/workflows/reusable-upload-recipe.yml index 178dd65b8e..d3fe0f356b 100644 --- a/.github/workflows/reusable-upload-recipe.yml +++ b/.github/workflows/reusable-upload-recipe.yml @@ -89,10 +89,10 @@ jobs: conan export . --version=rc conan upload --confirm --check --remote="${REMOTE_NAME}" xrpl/rc - # When this workflow is triggered by a tag event, it will always be when tagging a final + # When this workflow is triggered by a push event, it will always be when tagging a final # release, see on-tag.yml. - name: Upload Conan recipe (release) - if: ${{ github.event_name == 'tag' }} + if: ${{ startsWith(github.ref, 'refs/tags/') }} env: REMOTE_NAME: ${{ inputs.remote_name }} run: |