semantic-release plugin to publish a python package to PyPI
Step | Description |
---|---|
verifyConditions |
|
prepare |
Update the version in setup.cfg and create the distribution packages |
publish |
Publish the python package to the specified repository (default: pypi) |
Variable | Description | Required | Default |
---|---|---|---|
PYPI_TOKEN |
API token for PyPI | true | |
PYPI_USERNAME |
Username for PyPI | false | __token__ |
PYPI_REPO_URL |
Repo URL for PyPI | false | See Options |
The plugin can be configured in the semantic-release configuration file:
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"semantic-release-pypi",
]
}
An example using Github Actions can be found in the repo semantic-release-pypi-example.
Option | Type | Default | Description |
---|---|---|---|
setupPy |
str | ./setup.py |
location of setup.py |
distDir |
str | dist |
directory to put the source distribution archive(s) in, relative to the directory of setup.py |
repoUrl |
str | https://upload.pypi.org/legacy/ |
The repository (package index) to upload the package to. |
pypiPublish |
bool | true |
Whether to publish the python package to the pypi registry. If false the package version will still be updated. |
gpgSign |
bool | false |
Whether to sign the package using GPG. A valid PGP key must already be installed and configured on the host. |
gpgIdentity |
str | null |
When gpgSign is true, set the GPG identify to use when signing files. Leave empty to use the default identity. |
- pyenv >= 2.1.0
source init.sh
- Fork from this repository
- Run
source init.sh
- Make sure your code passes all unit tests by running
yarn test
- Issue a PR