Skip to content

Commit

Permalink
Publish to PyPI via OpenID Connect (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Mar 29, 2023
2 parents 4c1c5b0 + 2c4df0c commit ebffbc9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 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,13 +43,8 @@ jobs:
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

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

0 comments on commit ebffbc9

Please sign in to comment.