Skip to content

Commit c516d0d

Browse files
committed
Merge sdist and wheel build steps
1 parent 7e01cee commit c516d0d

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,29 @@ on:
1111
- published
1212

1313
jobs:
14-
build-wheels:
15-
name: Build wheels
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Build wheels
20-
uses: pypa/cibuildwheel@v2.20.0
21-
- uses: actions/upload-artifact@v4
22-
with:
23-
path: ./wheelhouse/*.whl
24-
25-
build-sdist:
26-
name: Build source distribution
14+
build:
15+
name: Build
2716
runs-on: ubuntu-latest
2817
steps:
2918
- uses: actions/checkout@v4
3019
- name: Build sdist
3120
run: pipx run build --sdist
21+
- name: Build wheels
22+
uses: pypa/cibuildwheel@v2.20.0
23+
- name: Prepare for artifact upload
24+
run: |
25+
mkdir out
26+
mv -t out dist/*.tar.gz
27+
mv -t out wheelhouse/*.whl
3228
- uses: actions/upload-artifact@v4
3329
with:
34-
path: dist/*.tar.gz
30+
if-no-files-found: error
31+
compression-level: 0
32+
path: out/
3533

3634
test-pypi-publish:
3735
name: Upload release to TestPyPI
38-
needs: [build-wheels, build-sdist]
36+
needs: [build]
3937
runs-on: ubuntu-latest
4038
environment: test-pypi
4139
permissions:
@@ -53,7 +51,7 @@ jobs:
5351

5452
pypi-publish:
5553
name: Upload release to PyPI
56-
needs: [build-wheels, build-sdist, test-pypi-publish]
54+
needs: [build, test-pypi-publish]
5755
runs-on: ubuntu-latest
5856
environment: pypi
5957
permissions:

0 commit comments

Comments
 (0)