From 3108f6c3c9639f58122908b7668e16102a42d722 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 15:56:58 +0100 Subject: [PATCH 1/8] use cibuildwheel --- .github/workflows/build-and-deploy-on-pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml index 00c7845..2d6bd6d 100644 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ b/.github/workflows/build-and-deploy-on-pypi.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - try_cibuildwheels jobs: build-n-publish: @@ -26,6 +27,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.14" + - uses: pypa/cibuildwheel@v3 - name: Install pep517 run: >- python -m @@ -35,7 +37,7 @@ jobs: - name: Build a binary wheel and a source tarball run: >- python -m - pep517.build + cibuildwheel # pep517.build --source --binary --out-dir dist/ From 33f46a651f17a15f40f7db8404a66136a4af4c43 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 15:58:49 +0100 Subject: [PATCH 2/8] wrong gha version --- .github/workflows/build-and-deploy-on-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml index 2d6bd6d..b6ed8dd 100644 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ b/.github/workflows/build-and-deploy-on-pypi.yml @@ -27,7 +27,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.14" - - uses: pypa/cibuildwheel@v3 + - uses: pypa/cibuildwheel@v2 - name: Install pep517 run: >- python -m From 3feae226fe5a32e1e60432932ccff348e2bc81ae Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:10:45 +0100 Subject: [PATCH 3/8] up version --- .github/workflows/build-and-deploy-on-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml index b6ed8dd..8774c27 100644 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ b/.github/workflows/build-and-deploy-on-pypi.yml @@ -27,7 +27,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: "3.14" - - uses: pypa/cibuildwheel@v2 + - uses: pypa/cibuildwheel@v3.2.1 - name: Install pep517 run: >- python -m From 9e5a9ef376e2a20876001496ce75bdd72daa1693 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:31:38 +0100 Subject: [PATCH 4/8] build the python bits --- .github/workflows/build-and-deploy-on-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml index 8774c27..6cc203f 100644 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ b/.github/workflows/build-and-deploy-on-pypi.yml @@ -37,7 +37,7 @@ jobs: - name: Build a binary wheel and a source tarball run: >- python -m - cibuildwheel # pep517.build + pep517.build --source --binary --out-dir dist/ From d3f3e419bdb8f4d99064ee109655258fdbfee1b6 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:43:13 +0100 Subject: [PATCH 5/8] unrun GHA --- .github/workflows/build-and-deploy-on-pypi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml index 6cc203f..8e93e7c 100644 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ b/.github/workflows/build-and-deploy-on-pypi.yml @@ -7,7 +7,6 @@ on: push: branches: - main - - try_cibuildwheels jobs: build-n-publish: From 629d8772176e59f054303f1318ec19e80a527762 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:43:48 +0100 Subject: [PATCH 6/8] add and run dedicated wheel bulder GHA --- .../build-and-deploy-wheels-on-pypi.yml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/build-and-deploy-wheels-on-pypi.yml diff --git a/.github/workflows/build-and-deploy-wheels-on-pypi.yml b/.github/workflows/build-and-deploy-wheels-on-pypi.yml new file mode 100644 index 0000000..dd3a1d4 --- /dev/null +++ b/.github/workflows/build-and-deploy-wheels-on-pypi.yml @@ -0,0 +1,102 @@ +name: Build and Publish Wheels + +on: + release: + types: [published] + # use this for testing + push: + branches: + - main + - try_cibuildwheels + +permissions: + contents: read + id-token: write # required for PyPI trusted publishing + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] # macos-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Build wheels + uses: pypa/cibuildwheel@v3.2.1 + env: + # Build CPython 3.11-3.14 + CIBW_BUILD: "cp311-* cp312-* cp313-* cp314-*" + CIBW_SKIP: "*-musllinux_* pp*" + # Run tests after build (optional) + # CIBW_TEST_COMMAND: "python -c \"import ppfive; print('import ok')\"" + + - name: Upload wheel artifacts + uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: ./wheelhouse/*.whl + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build backend + run: python -m pip install --upgrade build + + - name: Build sdist + run: python -m build --sdist + + - name: Upload sdist artifact + uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish: + name: Publish to PyPI + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + # publish only on version tags like v0.1.0 + if: startsWith(github.ref, 'refs/tags') + environment: + name: pypi + url: https://pypi.org/project/ppfive/ + permissions: + id-token: write + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: distfiles + + - name: Flatten artifacts + run: | + mkdir upload + find distfiles -type f \( -name "*.whl" -o -name "*.tar.gz" \) -exec cp {} upload/ \; + ls -la upload + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: upload From cc40ad158d16faab1cbe97ce8027c16e1c7021dd Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:46:22 +0100 Subject: [PATCH 7/8] remove obsolete workflow --- .../workflows/build-and-deploy-on-pypi.yml | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-on-pypi.yml diff --git a/.github/workflows/build-and-deploy-on-pypi.yml b/.github/workflows/build-and-deploy-on-pypi.yml deleted file mode 100644 index 8e93e7c..0000000 --- a/.github/workflows/build-and-deploy-on-pypi.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: PyPi Build and Deploy 🐍📦 - -on: - release: - types: [published] - # use this for testing - push: - branches: - - main - -jobs: - build-n-publish: - name: Build and publish ppfive on PyPi - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/project/ppfive/ - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - name: Set up Python 3.14 - uses: actions/setup-python@v6 - with: - python-version: "3.14" - - uses: pypa/cibuildwheel@v3.2.1 - - name: Install pep517 - run: >- - python -m - pip install - pep517 - --user - - name: Build a binary wheel and a source tarball - run: >- - python -m - pep517.build - --source - --binary - --out-dir dist/ - . - ### test for Test PyPI - # - name: Publish distribution to Test PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # repository-url: https://test.pypi.org/legacy/ - ### - - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 From a7d2f7cce20ed2510276245764a7529e06d1dd53 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Wed, 29 Apr 2026 16:47:02 +0100 Subject: [PATCH 8/8] unrun GHA locally --- .github/workflows/build-and-deploy-wheels-on-pypi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-deploy-wheels-on-pypi.yml b/.github/workflows/build-and-deploy-wheels-on-pypi.yml index dd3a1d4..ffd1c66 100644 --- a/.github/workflows/build-and-deploy-wheels-on-pypi.yml +++ b/.github/workflows/build-and-deploy-wheels-on-pypi.yml @@ -7,7 +7,6 @@ on: push: branches: - main - - try_cibuildwheels permissions: contents: read