2021-01-31 12:27:40 +00:00
# This workflow will upload a Python Package using Twine when a release 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
2021-02-01 22:31:44 +00:00
name : Publish Python Package
2021-01-31 12:27:40 +00:00
on :
release :
2021-02-01 22:31:44 +00:00
types :
- created
2021-01-31 12:27:40 +00:00
jobs :
2021-02-01 22:31:44 +00:00
publish :
2021-01-31 12:27:40 +00:00
runs-on : ubuntu-latest
2021-02-01 22:00:02 +00:00
strategy :
matrix :
python-version : [ 2.7 , 3.6 ]
2021-01-31 12:27:40 +00:00
steps :
- uses : actions/checkout@v2
2021-02-01 22:00:02 +00:00
- name : Set up Python ${{ matrix.python-version }}
2021-01-31 12:27:40 +00:00
uses : actions/setup-python@v2
with :
2021-02-01 22:00:02 +00:00
python-version : ${{ matrix.python-version }}
2021-01-31 12:27:40 +00:00
- name : Install dependencies
run : |
python -m pip install --upgrade pip
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/*