Skip to content

Commit

Permalink
use trusted publisher for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBok committed Jan 23, 2025
1 parent 894ecb9 commit 8389249
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ jobs:
name: Deploy packages
runs-on: ubuntu-latest
needs: test-wheels
permissions:
id-token: write
contents: read

steps:
- name: Setup Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -190,14 +193,8 @@ jobs:
- name: Upload packages to testpypi
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_TEST_TOKEN_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }}
run: python -m twine upload --skip-existing --repository testpypi dist/* --verbose

- name: Upload packages to pypi
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_PROD_TOKEN_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PROD_API_TOKEN }}
run: python -m twine upload --skip-existing dist/* --verbose

0 comments on commit 8389249

Please sign in to comment.