From 87ba2c1bd4c37ea2833a5de6c6661e30a34032ae 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..376ba87 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" + python-version: '3.x' + - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.11.2 @@ -30,16 +48,18 @@ 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] runs-on: ubuntu-latest @@ -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: