Skip to content

0.8.1

0.8.1 #15

Workflow file for this run

name: Publish-to-pypi
on:
release:
types: [released]
workflow_dispatch:
jobs:
build_sdist:
name: source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build sdist
run: |
pip install build
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
upload_pypi:
name: upload to PyPI
needs: [build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' &&
github.event.ref_type == 'tag' &&
github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'
steps:
- uses: actions/download-artifact@v4.1.7
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.5.1
with:
password: ${{ secrets.PYPI_API_TOKEN }}