Skip to content

Commit

Permalink
fix: Adds check for tag format to release script, also makes release …
Browse files Browse the repository at this point in the history
…script error on improper tags
  • Loading branch information
norwoodj committed Jul 8, 2024
1 parent a99bd6a commit 5a5d142
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- "*"
- "v*"

jobs:
release:
Expand Down
5 changes: 5 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ function main {
exit 1
fi

if ! [[ "${release_version}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Release version must be of the form 'v1.2.3'"
exit 1
fi

git commit -am "Release ${release_version}" --allow-empty
git cliff --tag "${release_version}" -o
git commit --amend -a
Expand Down

0 comments on commit 5a5d142

Please sign in to comment.