From 6a0d2e64382cbae4aefd7ff6069aabe84b37681f Mon Sep 17 00:00:00 2001 From: Dramelac Date: Wed, 20 Dec 2023 00:19:56 +0100 Subject: [PATCH] Update pypi publish method --- .github/workflows/entrypoint_nightly.yml | 5 ++++- .github/workflows/entrypoint_release.yml | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/entrypoint_nightly.yml b/.github/workflows/entrypoint_nightly.yml index 9219d6ef..7c07ac77 100644 --- a/.github/workflows/entrypoint_nightly.yml +++ b/.github/workflows/entrypoint_nightly.yml @@ -15,6 +15,10 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions to TestPyPI 📦 runs-on: ubuntu-latest + environment: nightly + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write needs: test steps: - uses: actions/checkout@master @@ -33,6 +37,5 @@ jobs: - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ skip-existing: true diff --git a/.github/workflows/entrypoint_release.yml b/.github/workflows/entrypoint_release.yml index 7cf0aa28..722cffd2 100644 --- a/.github/workflows/entrypoint_release.yml +++ b/.github/workflows/entrypoint_release.yml @@ -13,6 +13,10 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions to PyPI 📦 runs-on: ubuntu-latest + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write needs: test steps: - uses: actions/checkout@master @@ -31,10 +35,7 @@ jobs: - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ skip-existing: true - name: Publish distribution 📦 to PyPI (prod) uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }}