mirror of
https://gitcode.com/gh_mirrors/gh/gh-action-pypi-publish.git
synced 2026-07-02 18:27:49 +00:00
b6c2b2a4d0ed260dcdc8f0a9d40dcee7bb4ce74a
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 likef'{your_project}-bot'having the lowest privileges possible on your target dist page.TWINE_PASSWORD: it's a password for the account used inTWINE_USERNAMEenv 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.
Description
Languages
Python
67.4%
Shell
28.8%
Dockerfile
3.8%