From 2b803c319a05847f1c94e71cc0ac12fbc8472405 Mon Sep 17 00:00:00 2001 From: Alyssa Coghlan Date: Mon, 21 Oct 2024 19:54:08 +1000 Subject: [PATCH] Add publishing action --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b286532 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish release + +on: + release: + types: [published] + + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + permissions: + contents: read + # Allow use of GitHub OIDC for PyPI authentication + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: pdm-project/setup-pdm@v4 + with: + python-version: 3.12 + cache: true + + - name: Publish distribution package to PyPI + run: pdm publish diff --git a/.gitignore b/.gitignore index e1ce1a9..6aede0b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ __pycache__ .mypy* *.egg-info *.dist-info +/dist/