2020-11-20 10:06:27 +00:00
# This workflows will upload a Python Package using Twine when a tag is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name : Upload Python Package
on :
push :
# Sequence of patterns matched against refs/tags
tags :
2020-12-04 19:32:05 +00:00
- '*.*.*' # e.g. 1.0.0 or 20.15.10
2020-11-20 10:06:27 +00:00
2022-06-23 00:58:26 +00:00
permissions :
contents : read
2020-11-20 10:06:27 +00:00
jobs :
deploy :
runs-on : ubuntu-latest
steps :
2022-04-26 11:16:49 +01:00
- uses : actions/checkout@v3
2020-11-20 10:06:27 +00:00
- name : Set up Python
2022-07-06 09:58:50 +00:00
uses : actions/setup-python@v4
2020-11-20 10:06:27 +00:00
with :
python-version : '3.x'
- name : Install dependencies
run : |
pip install setuptools wheel twine
- name : Build and publish
env :
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
run : |
python setup.py sdist bdist_wheel
twine upload dist/*