Skip to content

Commit

Permalink
fix(release-main.yml): fix release permissions, add GitHub OIDC with …
Browse files Browse the repository at this point in the history
…PyPi
  • Loading branch information
dan-wilton committed Jun 5, 2024
1 parent eecc9ce commit 6346809
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ on:
tags:
- "*" # Will trigger for every tag, alternative: 'v*'

permissions:
# This permission is needed for private repositories.
contents: read
# This permission is mandatory for trusted publishing to PyPi.
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -22,8 +29,5 @@ jobs:
pdm install
- name: Build and publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pdm publish

0 comments on commit 6346809

Please sign in to comment.