From c859cb1fbed5ed05ba9c209e49b510c59356a56f Mon Sep 17 00:00:00 2001 From: Neal W Morton Date: Wed, 16 Jun 2021 23:50:39 -0500 Subject: [PATCH] build: add action for publishing to pypi --- .github/workflows/publish-to-pypi.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..a1bc96b --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,32 @@ +name: Publish distribution to PyPI +on: + release: + types: [created] +jobs: + deploy: + runs-on: ubuntu-latest + name: Build and publish to PyPI + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + 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 distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }}