Skip to content

Commit

Permalink
Change: Use trusted publisher process to deploy on PyPI
Browse files Browse the repository at this point in the history
[Trusted publisher](https://docs.pypi.org/trusted-publishers/) uses
OpenID Connect (OIDC) to issue short term tokens for GitHub. [Github
implements the OIDC standard](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
since some month.
  • Loading branch information
bjoernricks committed Jan 18, 2024
1 parent bcb3e86 commit 6aefbab
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: greenbone/actions/poetry@v3
with:
python-version: "3.10"
install-dependencies: "false"
- name: Build and publish
- name: Build
run: |
poetry build
poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 6aefbab

Please sign in to comment.