From 3d3dbe784af869cdccf3e0ff9bd00449d81f35a0 Mon Sep 17 00:00:00 2001 From: Daniel Danis Date: Wed, 21 Jan 2026 10:12:38 +0100 Subject: [PATCH] Add release action. --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..3c55426f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install the package + run: python -m pip install --editable .[test] + - name: Run tests + run: pytest + - name: Install build libraries + run: python3 -m pip install build + - name: Build package + run: python3 -m build + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }}