Skip to content

Workflow file for this run

# Build and deploy package to TestPyPI and PyPi
# From: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish Python distributions to TestPyPI and Pypi
on:
release:
branches: [ main ]
jobs:
build-n-publish:
name: Build and publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install build-n-publish
run : |
python -m pip install build --user
- name: Build package
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}