diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..7c452071 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +# Adapted from https://pdm-project.org/latest/usage/publish/ +on: + release: + types: [published] + +jobs: + pypi-publish: + name: Publish to PyPI + environment: release + runs-on: ubuntu-latest + permissions: + # This permission is needed for private repositories. + contents: read + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: pdm-project/setup-pdm@v4 + - name: Publish package distributions to PyPI + run: pdm publish