Skip to content

Commit

Permalink
SYS: Use PyPi trusted publisher system to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons authored May 10, 2024
1 parent 78cec7b commit c930fff
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@master

Expand All @@ -27,10 +30,4 @@ jobs:
- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
run: |
twine upload dist/* --repository pypi -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
- name: Upload to TestPyPi
if: startsWith(github.ref, 'refs/tags/') == false
run: |
twine upload dist/* --repository testpypi -u __token__ -p ${{ secrets.TESTPYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c930fff

Please sign in to comment.