Skip to content

Commit cde3d47

Browse files
committed
Fixup CI
- Share sdist action - Fix gathering uploaded artifacts
1 parent 6885e0e commit cde3d47

File tree

3 files changed

+42
-21
lines changed

3 files changed

+42
-21
lines changed

.github/workflows/build-wheels.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,16 @@ jobs:
77
uses: ./.github/workflows/run-cibuildwheel.yml
88
with:
99
prerelease-pythons: true
10+
11+
build_sdist:
12+
uses: ./.github/workflows/run-sdist.yml
13+
14+
check_build:
15+
needs: [build_wheels, build_sdist]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/download-artifact@v4
19+
with:
20+
path: dist
21+
merge-multiple: true
22+
- run: ls -lR dist

.github/workflows/release-wheels.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Release Wheels
22

33
on:
4-
pull_request:
54
release:
65
types:
76
- published
@@ -13,34 +12,19 @@ jobs:
1312
fail-fast: true
1413

1514
build_sdist:
16-
name: Build source distribution
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
submodules: true
22-
- uses: actions/setup-python@v5
23-
name: Install Python
24-
with:
25-
check-latest: true
26-
python-version: '3.13'
27-
- name: Install setuptools
28-
run: python -m pip install -U setuptools
29-
- name: Build sdist
30-
run: python setup.py sdist
31-
- uses: actions/upload-artifact@v4
32-
with:
33-
name: sdist
34-
path: dist/*.tar.gz
15+
uses: ./.github/workflows/run-sdist.yml
3516

3617
upload_pypi:
3718
needs: [build_wheels, build_sdist]
19+
if: github.event_name == 'release' && github.event.action == 'published'
3820
runs-on: ubuntu-latest
3921
steps:
4022
- uses: actions/download-artifact@v4
23+
with:
24+
path: dist
25+
merge-multiple: true
4126
- run: ls -lR dist
4227
- name: Upload to PyPI
43-
if: github.event_name == 'release' && github.event.action == 'published'
4428
uses: pypa/gh-action-pypi-publish@release/v1
4529
with:
4630
user: __token__

.github/workflows/run-sdist.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
build_sdist:
6+
name: Build source distribution
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
submodules: true
12+
- uses: actions/setup-python@v5
13+
name: Install Python
14+
with:
15+
check-latest: true
16+
python-version: '3.13'
17+
- name: Install setuptools
18+
run: python -m pip install -U setuptools
19+
- name: Build sdist
20+
run: python setup.py sdist
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: sdist
24+
path: dist/*.tar.gz

0 commit comments

Comments
 (0)