Skip to content

Commit 7bd0dc5

Browse files
committed
[workflow] fail release if run from brach
1 parent a94a5fe commit 7bd0dc5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/create-release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
name: Create Release for ${{ github.ref_name || github.event.inputs.tag }}
3333
runs-on: ubuntu-latest
3434
steps:
35+
- name: Check if tag is valid
36+
run: |
37+
if [[ ! "${{ github.ref_name }}" =~ ^refs/tags/v.* ]]; then
38+
echo "This workflow must only run for a tag and not a branch."
39+
exit 1
40+
fi
41+
3542
- name: Checkout code
3643
uses: actions/checkout@v4
3744
with:

0 commit comments

Comments
 (0)