diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..61b55a0 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,47 @@ +name: Build + +on: + - workflow_dispatch + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + - windows-latest + - windows-11-arm + - macos-15-intel + - macos-latest + + steps: + - name: Checkout repository (with tags) + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Determine latest tag + id: latest_tag + shell: bash + run: | + tag=$(git describe --tags --abbrev=0) + echo "tag=$tag" >> "$GITHUB_OUTPUT" + + - name: Checkout latest tag + run: git checkout ${{ steps.latest_tag.outputs.tag }} + + - uses: actions/setup-python@v5 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl