Skip to content

Publish Python

Publish Python #1

Workflow file for this run

name: Publish Python
on:
release:
types:
- published
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python setup.py sdist
working-directory: python
- uses: actions/upload-artifact@v3
with:
name: undr-sdist
path: python/dist/*.tar.gz
upload_pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: undr-sdist
path: dist
- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}