v1.2.1 #4
Workflow file for this run
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
name: Publish PyPI release | |
on: | |
release: | |
types: [published] | |
jobs: | |
# Upload to PyPI | |
pypi_upload: | |
name: Push new release to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish to PyPI | |
env: | |
# Username has to be __token__ to use API key | |
TWINE_USERNAME: __token__ | |
# PyPI API key registered as an action secret for the repo | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine check dist/* | |
twine upload dist/* |