Upload PRODUCTION Python Package #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SOURCE: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
name: Upload PRODUCTION Python Package | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish to Production PyPI | |
runs-on: ubuntu-20.04 # Use ubuntu-latest when https://github.com/actions/setup-python/issues/544 is fixed | |
environment: 'PyPI: Production' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install Build Tools | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools wheel | |
- name: Build Artifacts | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish Artifacts | |
uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |