@@ -28,23 +28,40 @@ jobs:
2828 git_committer_name : " github-actions"
2929 git_committer_email : " actions@users.noreply.github.com"
3030
31- - name : Publish | Upload to GitHub Release Assets
32- uses : python-semantic-release/publish-action@v10.0.2
33- if : steps.release.outputs.released == 'true'
34- with :
35- github_token : ${{ secrets.GITHUB_TOKEN }}
36- tag : ${{ steps.release.outputs.tag }}
37-
3831 - name : Setup uv & venv
3932 uses : astral-sh/setup-uv@v5
4033 if : steps.release.outputs.released == 'true'
4134
35+ - name : Update uv.lock
36+ run : uv lock
37+ if : steps.release.outputs.released == 'true'
38+
39+ - name : Commit uv.lock if changed
40+ run : |
41+ git config --global user.name "GitHub Actions"
42+ git config --global user.email "actions@github.com"
43+ if git diff --exit-code uv.lock > /dev/null; then
44+ echo "uv.lock unchanged"
45+ else
46+ git pull --rebase
47+ git add uv.lock
48+ git commit -m "chore: update uv.lock for v${{ steps.release.outputs.version }} [skip ci]" git push
49+ fi
50+ if : steps.release.outputs.released == 'true'
51+
4252 - name : Build package
4353 run : uv build --no-sources
4454 if : steps.release.outputs.released == 'true'
4555
56+ - name : Publish | Upload to GitHub Release Assets
57+ uses : python-semantic-release/publish-action@v10.0.2
58+ if : steps.release.outputs.released == 'true'
59+ with :
60+ github_token : ${{ secrets.GITHUB_TOKEN }}
61+ tag : ${{ steps.release.outputs.tag }}
62+
4663 - name : Publish to PyPI
4764 env :
4865 UV_PUBLISH_TOKEN : ${{ secrets.PYPI_TOKEN }}
4966 run : uv publish
50- if : steps.release.outputs.released == 'true'
67+ if : steps.release.outputs.released == 'true'
0 commit comments