Skip to content

Workflow file for this run

---
name: Build and upload Python Package
"on":
release:
types:
- created
- published
jobs:
deploy:
runs-on: ubuntu-latest
environment: deploy # only the deploy environment has `secrets.PYPI_TOKEN`
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade "build>=0.8.0" "twine>=4.0.1"
- name: Build package
run: |
python -m build .
- name: Check long description
run: python -m twine check dist/*
- name: Publish package on PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m twine upload dist/*