Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,15 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run semantic-release --verbose version
uv run semantic-release --verbose publish
uv run twine upload dist/* --verbose
# `uv build` (semantic-release's build_command) only runs when a release is
# warranted, so a no-release push (ci/docs/chore/style commits) leaves dist/
# empty. Guard the publish + PyPI upload instead of failing on an empty glob.
if [ -d dist ] && [ -n "$(ls -A dist 2>/dev/null)" ]; then
uv run semantic-release --verbose publish
uv run twine upload dist/* --verbose
else
echo "No release for these commits; skipping GitHub asset upload + PyPI publish."
fi

release:
name: Ensure GitHub Release for Tag
Expand Down
Loading