Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Publish python package to PyPI and Github

Project description

Codacy Quality Badge Codacy Coverage Badge

publish is a tool to package and release a python project. It will create a changelog and upload artifacts to Github and PyPI.

It is created for and by the FIAAS project, and used for most of our projects.


In order to use publish, you must first install it:

pip install publish

Under the covers, publish uses github-release and twine to do most of the work, and those tools require credentials for Github and PyPI to be available in environment variables:

export GITHUB_TOKEN=gh-token
export TWINE_USERNAME=pypi-user
export TWINE_PASSWORD=pypi-pass

In order to know where to upload the artifacts, you must specify an organization, and a repository:

publish fiaas k8s

Before uploading anything, publish will verify that the current checkout is suitable to be released, and checks the following items:

  • Are all files either ignored or in version control?
  • Is every change committed?
  • Is the currently checked out code tagged with an annotated tag?
  • Does that tag use the convention v<major>.<minor>.<bugfix>?

If the answer to all of these is yes, the name of the tag is used as the version to release. A changelog is generated from the git log, source tarballs and wheels are built, the release is created in Github and PyPI, and the files are uploaded.

Changes since last version

  • 84b47e4: Use correct regex for matching tags for auto-promotion
  • 6764d18: Ignore .pip_cache
  • aab6990: Explain more about why a repo is deemed unfit for release

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for publish, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size publish-0.3.1-py2.py3-none-any.whl (10.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size publish-0.3.1.tar.gz (13.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page