Package: PyPI Publisher task (deprecated)
Use this task in a build or release pipeline to create and upload an sdist or wheel to a PyPI-compatible index using Twine.
This task builds an sdist package by running
python setup.py sdist using the Python instance in
It can optionally build a universal wheel in addition to the sdist.
Then, it will upload the package to a PyPI index using
The task will install the
twine packages with
python -m pip install --user.
The PyPI Publisher task has been deprecated. You can now publish PyPI packages using twine authentication and custom scripts.
A generic service connection for a PyPI index.
To configure a new generic service connection, go to Settings -> Services -> New service connection -> Generic.
- Connection Name: A friendly connection name of your choice
- Server URL: PyPI package server (for example: https://upload.pypi.org/legacy/)
- User name: username for your PyPI account
- Password/Token Key: password for your PyPI account
# PyPI publisher # Create and upload an sdist or wheel to a PyPI-compatible index using Twine - task: PyPIPublisher@0 inputs: pypiConnection: packageDirectory: #alsoPublishWheel: false # Optional
|PyPI connection||A generic service connection for connecting to the package index.|
|Python package directory||The directory of the Python package to be created and published, where setup.py is present.|
|Also publish a wheel||Select whether to create and publish a universal wheel package (platform independent) in addition to an sdist package.|
This task is open source on GitHub. Feedback and contributions are welcome.
Q & A
Do I need an agent?
You need at least one agent to run your build or release. Get an agent for Linux, macOS, or Windows.
I'm having problems. How can I troubleshoot them?
I can't select a default agent pool and I can't queue my build or release. How do I fix this?
See Agent pools.