From a47fd14bd7a911feaa984029f81d5782da67aa47 Mon Sep 17 00:00:00 2001 From: Benjamin Cance <49796265+rowingdude@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:05:32 -0400 Subject: [PATCH] Create pypi_publishing.yaml --- .github/workflows/pypi_publishing.yaml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/pypi_publishing.yaml diff --git a/.github/workflows/pypi_publishing.yaml b/.github/workflows/pypi_publishing.yaml new file mode 100644 index 0000000..25fa399 --- /dev/null +++ b/.github/workflows/pypi_publishing.yaml @@ -0,0 +1,42 @@ +name: Publish Python Package + +on: + push: + branches: + - main + +jobs: + pypi-publish: + + name: Upload release to PyPI + runs-on: ubuntu-latest + + environment: + name: pypi + url: https://pypi.org/p/ + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12.4' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: pypi-publish + uses: pypa/gh-action-pypi-publish@v1.9.0 + + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}