Skip to content

PyPI How to upload a new version

Felix Hamborg edited this page Dec 16, 2021 · 3 revisions

You need to have pythons build and twine package installed. (python3 -m pip install --upgrade build twine) The following steps need to be performed if you want to publish a new version to PyPI.

In the root-directory of the repository:

  1. Open setup.cfg and change the version, e.g. version = 1.0.3
  2. Build the package: python -m build
  3. Publish the package: python -m twine upload dist/*
  4. Tag the current commit, e.g. git tag -a v1.0.3
  5. Share the created tag, e.g. git push origin v1.0.3
  6. rm -rf dist/* ; rm -rf NewsSentiment.egg-info/*
Clone this wiki locally