Skip to content

0.6.5

0.6.5 #4

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@v3
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@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}