Skip to content

Commit

Permalink
ci: Use trusted publishers for publishing to PyPI
Browse files Browse the repository at this point in the history
* Use the OpenID Connect (OIDC) standard to publish to PyPI using PyPI's
  "Trusted Publisher" implementation to publish without using API tokens
  stored as GitHub Actions secrets.
   - c.f. https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
   - c.f. https://docs.pypi.org/trusted-publishers/
  • Loading branch information
matthewfeickert committed Mar 22, 2024
1 parent f3e9540 commit 8fcd95c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
# Mandatory for publishing with a trusted publisher
# c.f. https://docs.pypi.org/trusted-publishers/using-a-publisher/
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -59,7 +63,6 @@ jobs:
if: github.repository == 'ssl-hep/ServiceX_frontend'
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password_servicex }}
print-hash: true

build-docs:
Expand Down

0 comments on commit 8fcd95c

Please sign in to comment.