Skip to content

Commit

Permalink
chore: Use PyPI OIDC to publish
Browse files Browse the repository at this point in the history
TODO: decide if we want to set up an _environment_ for releases.

For now, I've created a published without an environment.
  • Loading branch information
edgarrmondragon authored Apr 18, 2023
1 parent 244c1c5 commit 57c888b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Build & Release

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_and_release:
Expand Down Expand Up @@ -35,6 +39,5 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Deploy to PyPI
run: |
poetry publish -u "__token__" -p "${{ secrets.PYPI_SECRET_TOKEN }}"
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.5

0 comments on commit 57c888b

Please sign in to comment.