Publish to PyPI with uv
Build
uv build
Publish to TestPyPI
uv publish --token pypi-xxxx --publish-url https://test.pypi.org/legacy/
Publish to PyPI
uv publish --token pypi-xxxx
Add this Advice section—short and practical:
Advice
Clean build artifacts before building
rm -rf dist/
Bump version before publishing
- Update
versioninpyproject.toml - PyPI does not allow re-uploading the same version
- Always use test-pypi before uploading to PyPI
Update CHANGELOG.md
- Clearly list added/changed/fixed items for the release
Set correct development status
Update
classifiersinpyproject.tomlDevelopment Status :: 3 - AlphaDevelopment Status :: 4 - BetaDevelopment Status :: 5 - Production/Stable