Skip to content

Publish Python Package #4

Publish Python Package

Publish Python Package #4

Workflow file for this run

name: Publish Python Package
on:
release:
types: [published]
# workflow_dispatch:
workflow_run:
workflows: [Create Release]
types: [completed]
permissions:
contents: read
jobs:
pypi-publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.release }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publisher
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- name: Publish package to PyPI
run: pdm publish