Skip to content

Commit

Permalink
Merge pull request #89 from ssciwr/pypi-trusted-publisher
Browse files Browse the repository at this point in the history
Switch to PyPI trusted publishing
  • Loading branch information
dokempf authored Nov 20, 2023
2 parents 1fc8154 + 42b3f63 commit 342b13f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ jobs:
name: Upload to PyPI
needs: [build-wheels, build-sdist, test-sdist]
runs-on: ubuntu-20.04
permissions:
id-token: write
if: github.repository_owner == 'ssciwr'

steps:
Expand All @@ -160,16 +162,11 @@ jobs:
path: dist

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1
if: github.event.inputs.deploy_to_testpypi == 'false'
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Upload to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
uses: pypa/gh-action-pypi-publish@v1
if: github.event.inputs.deploy_to_testpypi == 'true'
with:
user: __token__
password: ${{ secrets.TESTPYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 342b13f

Please sign in to comment.