From 75e9192240a91ba838b2f6a82e5e06a5df9e587f Mon Sep 17 00:00:00 2001 From: Samuel Bradshaw Date: Wed, 2 Oct 2024 21:02:21 -0600 Subject: [PATCH] Add workflow for publishing to PyPI --- .github/workflows/publish.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bb19e81 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +# From https://www.seanh.cc/2022/05/21/publishing-python-packages-from-github-actions/ + +name: Publish to PyPI.org +on: + release: + types: [published] +jobs: + pypi: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: python3 -m pip install --upgrade build && python3 -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}