diff --git a/.github/workflows/github-deploy.yml b/.github/workflows/github-deploy.yml index fa07a88..5d9dc15 100644 --- a/.github/workflows/github-deploy.yml +++ b/.github/workflows/github-deploy.yml @@ -74,10 +74,9 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to PyPI on every tag starting with 'v' - # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') - # alternatively, to publish when a GitHub Release is created, use the following rule: - # if: github.event_name == 'release' && github.event.action == 'published' + environment: release + permissions: + id-token: write if: github.event_name == 'workflow_dispatch' steps: - uses: actions/download-artifact@v2 @@ -86,7 +85,3 @@ jobs: path: dist - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.pypi_username }} - password: ${{ secrets.pypi_password }} - # To test: repository_url: https://test.pypi.org/legacy/