Skip to content

Commit cf9de5e

Browse files
committed
update workflow
1 parent b01ea16 commit cf9de5e

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/build_whl.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,36 @@ jobs:
4848
uses: actions/upload-artifact@v4
4949
with:
5050
name: wheels_py${{ matrix.python-version }}
51-
path: |
52-
dist/*.whl
53-
dist/*.tar.gz
51+
path: dist/*.whl
52+
53+
- name: Upload source distribution (only once)
54+
if: matrix.python-version == '37' # Only upload source distribution once
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: source_dist
58+
path: dist/*.tar.gz
5459

5560
archive:
5661
runs-on: ubuntu-latest
5762
needs: build
5863
steps:
5964
- name: Download all wheels
65+
uses: actions/download-artifact@v4
66+
with:
67+
path: wheels
68+
pattern: wheels_py*
69+
70+
- name: Download source distribution
6071
uses: actions/download-artifact@v4
6172
with:
6273
path: dist
63-
pattern: |
64-
wheels_py*/*.whl
65-
wheels_py37/*.whl
74+
pattern: source_dist/*.tar.gz
6675

6776
- name: Combine all wheels into a single directory
6877
run: |
6978
mkdir -p dist
70-
find . -path './dist' -prune -o -name '*.whl' -exec mv {} dist/ \;
79+
find wheels -name '*.whl' -exec mv {} dist/ \;
80+
find dist -name '*.tar.gz' -exec mv {} dist/ \;
7181
7282
- name: Archive distribution files
7383
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)