Skip to content

Commit

Permalink
Publish to PyPI via OpenID Connect (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Mar 21, 2023
2 parents ed3c779 + 208683b commit 59fde8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
if: github.repository_owner == 'hugovk'
runs-on: ubuntu-latest

permissions:
# IMPORTANT: this permission is mandatory for OIDC publishing
id-token: write

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -39,11 +43,8 @@ jobs:
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}

- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/

0 comments on commit 59fde8f

Please sign in to comment.