The blessed :octocat: GitHub Action, for publishing your 📦 distribution files to PyPI: https://github.com/marketplace/actions/pypi-publish
Find a file
2019-05-26 17:53:57 +02:00
.github Add SECURITY text 2019-05-26 17:50:09 +02:00
.gitignore Initial commit 2019-03-27 19:44:44 +01:00
Dockerfile 📄🐳 Relicense the repo to BSD 3-clause 2019-03-29 23:21:12 +01:00
LICENSE.md 📄🐳 Relicense the repo to BSD 3-clause 2019-03-29 23:21:12 +01:00
README.md 🐛 Fix PyPI spelling in README 2019-05-26 17:53:57 +02:00

PyPI publish GitHub Action

This action allows you to upload your Python distribution package to PyPI.

Usage

To use the action simply add the following lines in the end of your .github/main.workflow.

action "Upload Python dist to PyPI" {
  uses = "re-actors/pypi-action@master"
  env = {
    TWINE_USERNAME = "f'{your_project}-bot'"
  }
  secrets = ["TWINE_PASSWORD"]
}

N.B. Use a valid tag, or branch, or commit SHA instead of master to pin the action to use a specific version of it.

Environment Variables and Secrets

  • TWINE_USERNAME: set this one to the username used to authenticate against PyPI. It is recommended to have a separate user account like f'{your_project}-bot' having the lowest privileges possible on your target dist page.
  • TWINE_PASSWORD: it's a password for the account used in TWINE_USERNAME env var. ATTENTION! WARNING! When adding this value to the Action node in your workflow, use SECRETS, not normal env vars.

License

The Dockerfile and associated scripts and documentation in this project are released under the BSD 3-clause license.