Skip to content

Commit

Permalink
Publish to PyPI via OpenID Connect
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Mar 21, 2023
1 parent ed3c779 commit 208683b
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 208683b

Please sign in to comment.