pypi: add github action

This commit is contained in:
James Woglom
2021-10-20 00:43:28 -04:00
parent b6569edabc
commit 82ec1b4c1b
+36
View File
@@ -0,0 +1,36 @@
name: Publish to PyPI
on:
push:
branches: [ master ]
jobs:
publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
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:
password: ${{ secrets.PYPI_API_TOKEN }}