From 756f3fa909ca68b13b97a3f4936e981e93f7226b Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Mon, 28 Oct 2024 13:18:02 +0100 Subject: [PATCH] ci: add environments to setup trusted publisher https://docs.pypi.org/trusted-publishers/ --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5172531..fae4a42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -222,6 +222,7 @@ jobs: needs: [build_wheels_macos, build_wheels_linux, build_wheels_windows, build_sdist] runs-on: ubuntu-20.04 if: github.event_name == 'push' && !(startsWith(github.ref, 'refs/tags/v')) + environment: test-pypi steps: - uses: actions/download-artifact@v4 with: @@ -233,14 +234,15 @@ jobs: with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true + repository-url: https://test.pypi.org/legacy/ + skip-existing: true upload_pypi: name: Upload to PyPI (prod) needs: [build_wheels_macos, build_wheels_linux, build_wheels_windows, build_sdist] runs-on: ubuntu-20.04 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + environment: pypi steps: - uses: actions/download-artifact@v4 with: