diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d61256b3..4be3a0a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,9 +6,6 @@ on: - main tags: - "*" - paths-ignore: - - "joss/**" - - "docs/**" pull_request: jobs: @@ -73,17 +70,18 @@ jobs: with: path: dist/* - upload_pypi: + publish: + environment: + name: pypi + url: https://pypi.org/p/exoplanet + permissions: + id-token: write needs: [tests, build] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.8.14 - with: - user: __token__ - password: ${{ secrets.pypi_password }}