From debfe83686b4e0901b81e8961299438610c1e41e Mon Sep 17 00:00:00 2001 From: Juan Orduz Date: Mon, 26 Aug 2024 11:20:32 +0200 Subject: [PATCH] Update pypi.yml --- .github/workflows/pypi.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 5f728a030..70b370018 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -45,6 +45,8 @@ jobs: name: artifact path: dist/* test: + permissions: + id-token: write name: upload to test PyPI needs: [build] runs-on: ubuntu-latest @@ -57,8 +59,6 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - uses: actions/setup-python@v4 with: @@ -71,6 +71,9 @@ jobs: venv-test-pypi/bin/python -c "import pymc_marketing; assert pymc_marketing.__version__ == '${{ github.ref_name }}'" publish: + environment: release + permissions: + id-token: write name: upload release to PyPI needs: [build, test] runs-on: ubuntu-latest @@ -81,6 +84,3 @@ jobs: name: artifact path: dist - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }}