Skip to content

Performing a Release

Nils Homer edited this page Oct 24, 2022 · 12 revisions

Publishing to test.pypi

  1. Config the repository $ poetry config repositories.testpypi https://test.pypi.org/legacy/
  2. build the package with $ poetry build
  3. test run $ poetry publish -r testpypi -u <username> -p <password> --dry-run
  4. publish with $ poetry publish -r testpypi -u <username> -p <password>
  5. test install with $ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple fgpyo

Publishing to PyPi

  1. make sure you're on the main branch
  2. remove the -dev suffix in the version in the pyproject.toml file, for example to bump from 0.0.3-dev to 0.0.4:
$ poetry version 0.0.4
  1. commit and tag the release
  2. build the package with $ poetry build
  3. test run $ poetry publish --dry-run
  4. publish with $ poetry publish
  5. update release notes on github
  6. bump the minor version in the pyproject.toml file, for example to bump from 0.0.4 to 0.0.5-dev:
$ poetry version 0.0.5-dev
Clone this wiki locally