Merge pull request #195 from mkinney/publish_to_pypi

add workflow to publish to pypi
This commit is contained in:
mkinney
2021-12-30 08:49:26 -08:00
committed by GitHub

34
.github/workflows/publish_to_pypi.py vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Publish PyPI
on: workflow_dispatch
jobs:
build-n-publish:
name: Build and publish distributions to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
username: __token__
password: ${{ secrets.PYPI_API_TOKEN }}