Skip to content

Commit

Permalink
fix(workflow): Semver check don't like v prefix in tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Jan 6, 2023
1 parent 210fa9d commit 2f9a3dc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 2f9a3dc

Please sign in to comment.