Skip to content

Commit

Permalink
👷 Update publish GitHub Action to use OIDC trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Mar 30, 2024
1 parent 89ecae0 commit 8a4c907
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- ./
- typer_package
- typer_cli_package
permissions:
id-token: write
steps:
- name: Dump GitHub context
env:
Expand All @@ -36,12 +38,8 @@ jobs:
- name: Build distribution
working-directory: ${{ matrix.package_dir }}
run: python -m build
- name: Publish
- name: Publish typer
if: ${{ matrix.package_dir == './'}}
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ${{ matrix.package_dir }}/dist/
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

0 comments on commit 8a4c907

Please sign in to comment.