Skip to content

Commit

Permalink
fix(ci/cd): version format check
Browse files Browse the repository at this point in the history
  • Loading branch information
xooooooooox committed Dec 27, 2024
1 parent 4010b44 commit f0f641a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
publish:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/trigger-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:

- name: Validate tag version format
run: |
# Fail if the release tag doesn't match x.x.x
if [[ ! "${{ github.event.release.tag_name }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error ::Invalid version format '${{ github.event.release.tag_name }}'. Must match x.x.x."
# Fail if the release tag doesn't match x.x or x.x.x
if [[ ! "${{ github.event.release.tag_name }}" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
echo "::error ::Invalid version format '${{ github.event.release.tag_name }}'. Must match x.x or x.x.x."
exit 1
fi
Expand Down

0 comments on commit f0f641a

Please sign in to comment.