From 981c80efc929891207f7716763e74e8fce64c7b7 Mon Sep 17 00:00:00 2001 From: Joao S O Bueno Date: Sat, 16 Nov 2024 15:13:18 -0300 Subject: [PATCH] First adjustment to workflow to use manylinux (A.I. generated yaml) --- .github/workflows/pypi.yml | 55 +++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 1d01a20..366ccf7 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -2,32 +2,43 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI on: push + +name: Build and Publish Manylinux Wheels + +on: + push: + branches: + - main + pull_request: + jobs: build: - name: Build distribution 📦 runs-on: ubuntu-latest - environment: - name: release - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: python3 -m build - - name: Store the distribution packages - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: dist/ + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python versions + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.14.1 + + - name: Build wheels + env: + CIBW_BUILD: "cp312-* cp313-*" + CIBW_SKIP: "pp*" + CIBW_PLATFORM: "manylinux2014_x86_64" # Adjust if needed + run: | + python -m cibuildwheel --output-dir dist + + - name: Upload built wheels as artifact + uses: actions/upload-artifact@v4 + with: + name: built-wheels + path: dist publish-to-pypi: name: >-