From 3c68bb5e75803b9653d5aabad0cfde81258f13e8 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Sun, 10 Dec 2023 16:37:04 +0100 Subject: [PATCH] add release process --- .github/workflows/release.yaml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..737a2df --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +name: Release to PyPI + +on: + release: + types: [published] + +jobs: + tests: + uses: ./.github/workflows/test.yaml + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + needs: tests + environment: release + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true