Skip to content

Commit

Permalink
ci: give unique names to wheel artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Apr 11, 2024
1 parent 082321e commit b87b317
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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'
Expand All @@ -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/[email protected]
with:
Expand Down

0 comments on commit b87b317

Please sign in to comment.