Skip to content

Publish to PyPI

Publish to PyPI #3

name: Publish to PyPI
on:
workflow_run:
workflows: ["Bump Version"]
types:
- completed
jobs:
publish:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Publish to PyPI"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: pip install setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}