diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index f2acdde9..0150d38e 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -61,14 +61,16 @@ jobs: m4 - uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.23.2 + run: python -m pip install cibuildwheel - name: Build and test wheels env: - # skip 32-bit, PyPy, and musllinux builds - CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *musllinux*" + # skip 32-bit, musllinux, and free-threaded builds + CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-*" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} @@ -183,3 +185,36 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1.12 with: attestations: false + + make_sdist: + name: Make source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + submodules: true + + - name: Build source distribution + run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz + + upload_sdist: + needs: [build_wheels, make_sdist] + environment: pypi + permissions: + id-token: write + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v5 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file