Skip to content

Commit 947eb7c

Browse files
authored
Merge pull request #39 from iquzart/develop
[Fix] Release Workflow
2 parents 8784ee8 + 245aba3 commit 947eb7c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/create-release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ on:
2626

2727
permissions:
2828
contents: write
29+
pull-requests: read
2930

3031
jobs:
3132
release:
@@ -35,9 +36,10 @@ jobs:
3536
- name: Check if tag is valid
3637
if: ${{ github.event_name == 'workflow_dispatch' }}
3738
run: |
38-
if [[ ! "${{ github.ref_name }}" =~ ^refs/tags/v.* ]]; then
39-
echo "Failure: The workflow was triggered by a branch or an invalid tag."
40-
exit 1
39+
TAG="${{ github.event.inputs.tag || github.ref_name }}"
40+
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
41+
echo "Failure: The tag '$TAG' is invalid. Tag must start with 'v' followed by semantic version (e.g., v1.0.0)"
42+
exit 1
4143
fi
4244
4345
- name: Checkout code

0 commit comments

Comments
 (0)