uv-publish
Publish Python packages to PyPI
TLDR
Publish all distributions in dist/ to PyPI
$ uv publish
Publish to TestPyPI$ uv publish --publish-url https://test.pypi.org/legacy/
Publish using a named index from pyproject.toml$ uv publish --index [name]
Publish with an API token$ uv publish --token [pypi-token]
Publish specific files$ uv publish [dist/package-1.0.tar.gz] [dist/package-1.0-py3-none-any.whl]
Publish and skip already-uploaded files$ uv publish --check-url https://pypi.org/simple/
SYNOPSIS
uv publish [options] [files...]
DESCRIPTION
uv publish uploads Python packages to PyPI or other registries. It publishes wheel and source distributions found in the dist/ directory by default. Supports authentication via API token, username/password, trusted publishing (GitHub Actions, GitLab CI/CD), or keyring.When --check-url is provided, uv skips uploading files that are identical to those already on the registry, making it safe for parallel CI uploads.
PARAMETERS
--publish-url url
URL of the upload endpoint for the target registry.--index name
Publish to a named index configured in pyproject.toml.--token token
Authentication token (e.g., PyPI API token). Env: UVPUBLISHTOKEN.--username user
Repository username. Env: UVPUBLISHUSERNAME.--password pass
Repository password. Env: UVPUBLISHPASSWORD.--check-url url
Index URL to check for existing packages; skips identical uploads and handles parallel races.--trusted-publishing value
Configure trusted publishing (always, never). Supported in GitHub Actions and GitLab CI/CD.--keyring-provider provider
Use keyring for authentication (subprocess).--no-attestations
Disable automatic attestation uploads. Env: UVPUBLISHNO_ATTESTATIONS.
