Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a uv publish command #6278

Closed
zanieb opened this issue Aug 20, 2024 · 7 comments
Closed

Add a uv publish command #6278

zanieb opened this issue Aug 20, 2024 · 7 comments
Labels
cli Related to the command line interface projects Related to project management capabilities

Comments

@zanieb
Copy link
Member

zanieb commented Aug 20, 2024

e.g., to publish the project to PyPI.

This is a pretty large, but well isolated project — if you've contributed previously and are interested in working on it let me know.

@zanieb zanieb added help wanted Contribution especially encouraged projects Related to project management capabilities cli Related to the command line interface labels Aug 20, 2024
@pplmx
Copy link

pplmx commented Aug 21, 2024

Add uv build and uv test too?

@zanieb
Copy link
Member Author

zanieb commented Aug 22, 2024

Those are both out of scope for this issue — though uv build should be trivial once uv publish is set up. See #1510 for the relevant tracking issue there.

@Zaf4
Copy link

Zaf4 commented Aug 25, 2024

I was going to open the same issue I have been using poetry for publishing. Would be great to fully switch to uv for everything.

@woodruffw
Copy link

Hi all! I'm neither a maintainer of PyPI nor twine, but I'm an active contributor to both who has touched a lot of the components related to uploading/API tokens/etc. It's very exciting to see uv consider adding publishing support!

A couple of things that might be worth considering as part of an implementation here:

  • PyPI and TestPyPI both support trusted publishing, i.e. credentialless package publishing via OIDC. This is handled transparently at the API token issuance layer to avoid any changes to PyPI's authentication parameters, but a future uv publish command could avoid the need for a separate token exchange step by performing the token exchange internally.
  • PyPI and TestPyPI are nearing the completion of initial support for PEP 740, i.e. index support for digital attestations over packages. twine has support for detecting and uploading attestations; a future uv publish command could consider adding support as well 🙂

I'm happy to provide more details on the above or anything else related to publishing, to those interested. Just let me know!

@andrlik
Copy link

andrlik commented Aug 28, 2024

Adding this comment to the correct issue. 🤦

Would be good to mimic the rye publish command where it prompts you to encrypt your PyPI token with a password.

@konstin konstin self-assigned this Sep 13, 2024
@konstin konstin removed the help wanted Contribution especially encouraged label Sep 13, 2024
@konstin
Copy link
Member

konstin commented Sep 24, 2024

uv publish is now implemented. It supports token authentication (for PyPI), username/password authentication, keyring integration and trusted publishing support for GitHub Actions + PyPI (publishing without manually configuration a secret in GitHub Actions). In the next release, it will ship in preview mode (pass --preview to use it), as we might still need to make minor adjustments to the CLI outside of our usual stability policy.

If you are running into any problems, please open an issue! Especially for authentication with private registries feedback would be invaluable.

@konstin konstin closed this as completed Sep 24, 2024
@konstin konstin removed their assignment Sep 24, 2024
@juan-abia
Copy link

Related @konstin:
#8221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface projects Related to project management capabilities
Projects
None yet
Development

No branches or pull requests

7 participants