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
12 changes: 11 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ jobs:
- name: Bump version
run: uv version --bump patch

- name: Capture new version
id: version
run: |
NEW_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
echo "New version: $NEW_VERSION"

- name: Build package
run: |
uv build
Expand All @@ -112,7 +119,7 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: uv run twine upload --verbose dist/*

- name: Push version bump to GitHub
- name: Push version bump and tag to GitHub
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -121,4 +128,7 @@ jobs:
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "chore: bump version [ci skip]" || echo "No changes to commit"
TAG="v${{ steps.version.outputs.version }}"
git tag -a "$TAG" -m "Release $TAG"
git push
git push origin "$TAG"
Loading