From 0a4ce930dedbfe6366a292c514c9fa08d08caa13 Mon Sep 17 00:00:00 2001 From: Ilya Priven Date: Tue, 21 May 2024 14:48:15 -0400 Subject: [PATCH] publish to pypi as a trusted publisher --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db5220f3..acab09ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,6 +11,9 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: release + permissions: + id-token: write steps: - uses: actions/checkout@v3 - name: Set up Python @@ -30,12 +33,9 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 if: ${{ github.event_name == 'release' }} - with: - password: ${{ secrets.PYPI_API_TOKEN }} - name: Publish to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 if: ${{ github.event_name == 'workflow_dispatch' }} with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/