Skip to content

Commit 5a5d142

Browse files
committed
fix: Adds check for tag format to release script, also makes release script error on improper tags
1 parent a99bd6a commit 5a5d142

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "*"
6+
- "v*"
77

88
jobs:
99
release:

release.sh

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function main {
88
exit 1
99
fi
1010

11+
if ! [[ "${release_version}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
12+
echo "Release version must be of the form 'v1.2.3'"
13+
exit 1
14+
fi
15+
1116
git commit -am "Release ${release_version}" --allow-empty
1217
git cliff --tag "${release_version}" -o
1318
git commit --amend -a

0 commit comments

Comments
 (0)