We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8784ee8 + 245aba3 commit 947eb7cCopy full SHA for 947eb7c
1 file changed
.github/workflows/create-release.yaml
@@ -26,6 +26,7 @@ on:
26
27
permissions:
28
contents: write
29
+ pull-requests: read
30
31
jobs:
32
release:
@@ -35,9 +36,10 @@ jobs:
35
36
- name: Check if tag is valid
37
if: ${{ github.event_name == 'workflow_dispatch' }}
38
run: |
- 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
+ TAG="${{ github.event.inputs.tag || github.ref_name }}"
+ 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
43
fi
44
45
- name: Checkout code
0 commit comments