From 2f9a3dc889860d5865c6759dae66f557c6903b3b Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Fri, 6 Jan 2023 18:15:17 +0100 Subject: [PATCH] fix(workflow): Semver check don't like v prefix in tag --- .github/workflows/release.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e856e1bf..3fccb8ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,9 +9,14 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: skymatic/semver-validation-action@v2 - with: - version: ${{ github.event.release.tag_name }} + - name: Check semver version in tag + run: | + prefix="v" + tag_name="${{ github.event.release.tag_name }}" + semver_regex="(0|[1-9]\d*)+\.(0|[1-9]\d*)+\.(0|[1-9]\d*)+(-(([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*|0|[1-9]\d*)(\.([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*|0|[1-9]\d*))*))?(\\+([\da-z-]+(\.[\da-z-]+)*))?" + echo "Checking version: $semver_regex" + echo "$tag_name" | grep -Eq "^$prefix$semver_regex\$" + shell: bash - uses: actions/checkout@v3 with: ref: ${{ github.event.release.tag_name }}