Skip to content

Workflow file for this run

---
name: Build and upload Python Package
on:
release:
types: [created]
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.8
- name: Install dependencies
run: |
python -m pip install --upgrade "build>=1.2.1" "twine>=5.1.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: |
twine upload dist/*