Skip to content

Commit

Permalink
Filter version tags my regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Flagro committed Feb 5, 2024
1 parent bc9aec1 commit 01f43cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
- name: Get latest tag or set default
id: latest_tag
run: |
TAG=$(git describe --tags `git rev-list --tags --max-count=1` 2>/dev/null || echo "0.0.0")
TAG=$(git tag -l "v*" --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
if [ -z "$TAG" ]; then
TAG="0.0.0"
fi
echo "::set-output name=tag::$TAG"
- name: Create dummy package.json
Expand Down

0 comments on commit 01f43cb

Please sign in to comment.