From b015a89943df218cf93834074e87ed2e1115c006 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 11 Apr 2024 09:50:12 +0300 Subject: [PATCH] ci: give unique names to wheel artifacts --- .github/workflows/wheels.yml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4194f1e..86627da 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -8,7 +8,24 @@ on: types: [created] jobs: + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Build sdist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz + build_wheels: + name: Build wheels on ${{ matrix.os }} strategy: fail-fast: false matrix: @@ -18,10 +35,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: python - uses: actions/setup-python@v4 + + - uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.11.2 @@ -30,18 +48,20 @@ jobs: uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '11' + - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse # to supply options, put them in 'env', like: env: CIBW_SKIP: "*-musllinux_i686 cp36-* cp37-* pp37-*" + - uses: actions/upload-artifact@v3 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl - deploy: - needs: [build_wheels] + needs: [build_sdist, build_wheels] runs-on: ubuntu-latest name: Deploy if: github.event_name == 'release' && github.event.action == 'created' @@ -50,12 +70,10 @@ jobs: - name: download artifacts uses: actions/download-artifact@v3 with: - # unpacks default artifact into dist/ - # if `name: artifact` is omitted, the action will create extra parent dir - name: artifact + pattern: cibw-* path: dist - - name: build sdist - run: python setup.py sdist + merge-multiple: true + - name: deploy uses: pypa/gh-action-pypi-publish@v1.5.0 with: