Skip to content

Commit

Permalink
publish to pypi as a trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst authored May 21, 2024
1 parent ba49719 commit 21d4fdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -30,14 +33,11 @@ jobs:
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event_name == 'release' }}
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event_name != 'release' }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
# Since we run this often, it's OK if that version already exists
skip_existing: true

0 comments on commit 21d4fdd

Please sign in to comment.