-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add create release action to ease releasing
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
export VERSION="${1:-}" | ||
|
||
echo "$VERSION" | grep -qEo '[0-9]+\.[0-9]+\.[0-9]+' | ||
if [ $? -ne 0 ]; then | ||
echo "Invalid version number. Please use the format '0.2.0'" | ||
exit 1 | ||
fi | ||
|
||
# Bump version in pyproject.toml and sync the uv.lock file | ||
sed -i 's/^\(version = \).*$/\1'\"$VERSION\"'/' pyproject.toml | ||
uv sync | ||
|
||
git add pyproject.toml uv.lock | ||
git commit -m "chore: bump version to $VERSION" | ||
git tag -a "$VERSION" -m "$VERSION" | ||
|
||
git push origin main "$VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters