bionitio-python icon indicating copy to clipboard operation
bionitio-python copied to clipboard

Automatic deploy to PyPI / setup.py improvements

Open ewels opened this issue 5 years ago • 0 comments

Two things in this PR:

A bit of a clean-up on setup.py

  • Use setuptools instead of distutils (not sure if you had a specific reason to use distutils?)
  • Use the repository readme file for the long description, specify that it's written in markdown
  • Set the licence field to MIT as that is what is in the LICENSE file
  • Use setuptools.find_packages() instead of manually supplying the package name(s)
  • Add a few other previously missing fields

Automated releases on PyPI

A new GitHub action workflow that runs when a new GitHub release is made. It builds the dist and pushes it to PyPI automatically. Two special considerations:

  • It checks the repository name, so only runs if the repo is BIONITIO_GITHUB_USERNAME/bionitio
    • This is to avoid trying to push releases on forks, though I'm not sure why people would make GitHub releases on their fork.
  • It requires a secret called PYPI_PASSWORD to work
    • This must be set by the user in the GitHub repository settings. See GitHub docs

ewels avatar Jul 21 '20 08:07 ewels