PyPI publish CI #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyPI publish CI | |
on: | |
push: | |
tags: | |
- v* | |
release: | |
types: [ published ] | |
# Manual triggers with workflow_dispatch | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v3 | |
- name: Install pdm-publish | |
run: pdm plugin add pdm-publish | |
- name: Publish package distributions to PyPI | |
run: pdm publish --password ${{ secrets.PYPI_API_TOKEN }} | |