From ce9b0f19a1dc86cee34671a8f93c32b95e84e48c Mon Sep 17 00:00:00 2001 From: Dan Foreman-Mackey Date: Tue, 16 Apr 2024 11:36:00 -0400 Subject: [PATCH] Updating publishing workflow (#322) --- .github/workflows/tests.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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 }}