Skip to content

Commit

Permalink
chore: Use PyPI OIDC to publish (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Apr 18, 2023
1 parent fdbbd49 commit 9f9ba9f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Upload Python Package

on:
release:
types: [created]
types: [published] # Trigger only when a release is published, not when a release is drafted

permissions:
contents: write # Needed to upload artifacts to the release
id-token: write # Needed for OIDC PyPI publishing

jobs:
build_deploy:
Expand Down Expand Up @@ -35,7 +39,5 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Deploy to PyPI
run: |
poetry publish -r testpypi -u "__token__" -p "${{ secrets.TEST_PYPI_TOKEN }}"
poetry publish -u "__token__" -p "${{ secrets.PYPI_TOKEN }}"
- name: Publish
uses: pypa/[email protected]

0 comments on commit 9f9ba9f

Please sign in to comment.