Skip to content

Pre-commit autoupdate #173

Pre-commit autoupdate

Pre-commit autoupdate #173

name: Build and upload to PyPI
on:
pull_request:
release:
types:
- published
jobs:
build_sdist_and_wheel:
name: Build sdist and wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v3
with:
path: dist/*
upload_pypi:
name: Upload to PyPI
needs: [build_sdist_and_wheel]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}