Upload PRODUCTION Python Package #24
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
# Manually publish to production PyPI | |
# @ssee: 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-latest | |
environment: 'PyPI: Production' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
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@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |