From 6a5327e26d6124e89822a120b21de708a9034412 Mon Sep 17 00:00:00 2001 From: Florian Schieder Date: Mon, 29 Dec 2025 10:05:13 +0100 Subject: [PATCH 1/2] python publish action --- .github/workflows/python-publish.yml | 36 ++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..50c4eac --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,36 @@ +name: publish to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + strategy: + matrix: + python-version: ['313', '314'] + + # NOTE this only runs on ubuntu because + # 'This action is only able to run under GNU/Linux environments' + # ~ gh-action-pypi-publish 1.13.0, 29.12.2025 + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools + - name: Build package + uses: pypa/cibuildwheel@v3.3.0 + env: + CIBW_BUILD: cp${{matrix.python-version}}-* + with: + output-dir: dist/ + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ diff --git a/pyproject.toml b/pyproject.toml index 77e282a..83c850b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sqlquerypp" -version = "0.1.0a4" +version = "0.1.0a5" description = "SQL query preprocessor for generating optimized queries" readme = "README.md" repository = "https://github.com/puzzleYOU/sqlquerypp" From 82445f395e60a799e465debcfb31b9a822ccc6f1 Mon Sep 17 00:00:00 2001 From: Florian Schieder Date: Mon, 29 Dec 2025 10:11:23 +0100 Subject: [PATCH 2/2] updated developer notes regarding release workflow. --- DEVELOPMENT.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index e4f2e7c..fbe0f87 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -58,14 +58,7 @@ This package is mainly separated into two components: - `codegen/` provides common structs, traits and functions for generating valid SQL statements from a `FinalParserState`. -## Manual release workflow +## Release workflow -- `source .venv/bin/activate` - -- `maturin build --release` - - if successful, returns output like "Built wheel for CPython 3.13 to 'PATH'" - -- `maturin upload ` (use 'PATH' from last command) - - **NOTE**: This requires token-based authentication. As this is just a - quick-and-dirty solution which should not be necessary for long, I - won't document this further. +GitHub workflows take care of compiling and releasing a new package version +for each supported Python interpreter and OS version.