Create pypi-publish.yml

This commit is contained in:
student_2333 2024-10-29 12:59:01 +08:00 committed by GitHub
parent 75ef2a2e8e
commit 9fe5c10d2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

27
.github/workflows/pypi-publish.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-n-publish:
name: Use PDM to Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Build and Publish distribution 📦 to PyPI
run: pdm publish