From e6eb26a8d6be093567a51dec273f3ccbeac38b94 Mon Sep 17 00:00:00 2001 From: dfjswanson <30530490+dfjswanson@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:20:24 -0600 Subject: [PATCH] Update python-publish.yml --- .github/workflows/python-publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index f4c6ad4..3cb9273 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -73,5 +73,28 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ + + publish-to-prodpypi: + if: "!github.event.release.prerelease" + name: publish python distribution to ProdPyPi + needs: + - build + runs-on: ubuntu-latest + + environment: + name: prodpypi + url: https://pypi.org/p/dataforge-core + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: publish dist to ProdPyPI + uses: pypa/gh-action-pypi-publish@release/v1