88jobs :
99
1010 build :
11- name : ' py${{ matrix.python }} on ${{ matrix.os }}'
12- runs-on : ${{ matrix.os }}
13- strategy :
14- matrix :
15- os : [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04]
16- python : ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
11+ name : Build distribution
12+ runs-on : ubuntu-latest
1713 steps :
1814 - uses : actions/checkout@v4
1915 with :
@@ -23,14 +19,38 @@ jobs:
2319 - uses : actions/setup-python@v5
2420 name : Install Python
2521 with :
26- python-version : ${{ matrix.python }}
27- allow-prereleases : true
22+ python-version : ' 3.11'
2823
2924 - name : Build
3025 run : |
3126 python -m pip install -U pip build twine setuptools setuptools_scm wheel
3227 python -m build
3328
29+ - uses : actions/upload-artifact@v4
30+ with :
31+ name : dist
32+ path : dist/*
33+
34+ test :
35+ name : ' Test py${{ matrix.python }} on ${{ matrix.os }}'
36+ needs : [build]
37+ runs-on : ${{ matrix.os }}
38+ strategy :
39+ matrix :
40+ os : [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04]
41+ python : ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
42+ steps :
43+ - uses : actions/download-artifact@v4
44+ with :
45+ name : dist
46+ path : dist
47+
48+ - uses : actions/setup-python@v5
49+ name : Install Python
50+ with :
51+ python-version : ${{ matrix.python }}
52+ allow-prereleases : true
53+
3454 - name : Test the sdist
3555 run : |
3656 python -m venv venv-sdist
@@ -43,22 +63,16 @@ jobs:
4363 venv-wheel/bin/python -m pip install dist/vspace*.whl
4464 venv-wheel/bin/python -c "import vspace; print(vspace.__version__)"
4565
46- - uses : actions/upload-artifact@v4
47- with :
48- name : dist-${{ matrix.os }}-${{ matrix.python }}
49- path : dist/*
50-
5166 upload_pypi :
52- needs : [build]
67+ needs : [build, test ]
5368 runs-on : ubuntu-latest
5469 if : github.event_name == 'release' && github.event.action == 'published'
5570 permissions :
5671 id-token : write
5772 steps :
5873 - uses : actions/download-artifact@v4
5974 with :
60- pattern : dist-*
75+ name : dist
6176 path : dist
62- merge-multiple : true
6377
6478 - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments