From d9d42d8ced995864501f94982231ad0256020f36 Mon Sep 17 00:00:00 2001 From: Michael Chow Date: Thu, 9 Nov 2023 18:11:21 -0500 Subject: [PATCH] ci: deploy to pypi on release --- .github/workflows/ci-tests.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index cf1dcc140..b7d0972d8 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -33,3 +33,24 @@ jobs: - name: pytest unit tests run: | make test + + + release-pypi: + name: "Release to pypi" + runs-on: ubuntu-latest + needs: [build] + if: github.event_name == 'release' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: "Build Package" + run: | + python -m pip install build wheel + python -m build --sdist --wheel + - name: "Deploy to PyPI" + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}