2020permissions : {}
2121jobs :
2222
23- build_scancode_wheel_for_pypi :
23+ build_scancode_wheels_sdist_for_pypi :
2424 permissions :
2525 contents : read # to fetch code (actions/checkout)
2626
@@ -31,59 +31,25 @@ jobs:
3131 run :
3232 shell : bash
3333
34- strategy :
35- fail-fast : true
36- matrix :
37- pyver : ["3.10", "3.11", "3.12", "3.13", "3.14"]
38-
39- steps :
40- - uses : actions/checkout@v4
41-
42- - name : Set up Python on ${{ matrix.pyver }}
43- uses : actions/setup-python@v5
44- with :
45- python-version : ${{ matrix.pyver }}
46-
47- - name : Install requirements then build main and mini wheel
48- run : etc/release/scancode-create-pypi-wheel.sh
49-
50- - name : Collect built wheels for ${{ matrix.pyver }}
51- uses : actions/upload-artifact@v4
52- with :
53- name : wheels-${{ matrix.pyver }}
54- path : dist/*.whl
55-
56-
57- build_scancode_sdist_for_pypi :
58- permissions :
59- contents : read # to fetch code (actions/checkout)
60-
61- name : Build PyPI sdist archives
62- runs-on : ubuntu-24.04
63-
64- defaults :
65- run :
66- shell : bash
67-
68- strategy :
69- fail-fast : true
70-
7134 steps :
7235 - uses : actions/checkout@v4
7336
7437 - name : Set up Python
7538 uses : actions/setup-python@v5
7639 with :
77- python-version : " 3.14"
40+ python-version : 3.14
41+
42+ - name : Install requirements then build main and mini wheel, sdist
43+ run : etc/release/scancode-create-pypi-wheel-and-sdist.sh
7844
79- - name : Install requirements then build main and mini sdist
80- run : etc/release/scancode -create-pypi-sdist.sh
45+ - name : Install requirements then build licensedcode data/index wheels, sdist
46+ run : etc/release/licensedcode -create-pypi-wheel-and -sdist.sh
8147
82- - name : Collect built sdist
48+ - name : Collect built wheels and sdist
8349 uses : actions/upload-artifact@v4
8450 with :
85- name : sdists
86- path : dist/*.tar.gz
51+ name : wheels_sdist
52+ path : dist/*
8753
8854
8955 build_scancode_for_release_linux :
@@ -229,7 +195,7 @@ jobs:
229195
230196 name : Test PyPI wheels on linux and mac
231197 needs :
232- - build_scancode_wheel_for_pypi
198+ - build_scancode_wheels_sdist_for_pypi
233199 runs-on : ${{ matrix.os }}
234200
235201 defaults :
@@ -253,16 +219,20 @@ jobs:
253219 - name : Download wheels artifact
254220 uses : actions/download-artifact@v4
255221 with :
256- name : wheels-${{ matrix.pyver }}
222+ name : wheels_sdist
257223 path : dist
258224
259- - name : test install wheels
225+ - name : install and test wheels
260226 run : |
261227 echo "license: gpl-2.0" > some.file
262228 rm -rf venv; \
263229 python -m venv venv
264230 venv/bin/python -m pip install --upgrade pip wheel setuptools
265- for f in `find dist -type f -name "*${{ matrix.pyver }}*"`; \
231+ for f in `find dist -type f -name "licensedcode*.whl"`; \
232+ do \
233+ venv/bin/python -m pip install --force-reinstall "$f" ; \
234+ done
235+ for f in `find dist -type f -name "scancode_toolkit-*.whl"`; \
266236 do \
267237 venv/bin/python -m pip install --force-reinstall "$f[full]" ; \
268238 venv/bin/scancode -clipeu --json-pp - some.file ; \
@@ -275,7 +245,7 @@ jobs:
275245
276246 name : Test PyPI wheels on Windows
277247 needs :
278- - build_scancode_wheel_for_pypi
248+ - build_scancode_wheels_sdist_for_pypi
279249 runs-on : ${{ matrix.os }}
280250
281251 defaults :
@@ -299,15 +269,19 @@ jobs:
299269 - name : Download wheels artifact
300270 uses : actions/download-artifact@v4
301271 with :
302- name : wheels-${{ matrix.pyver }}
272+ name : wheels_sdist
303273 path : dist
304274
305- - name : test install wheel
275+ - name : install and test wheels
306276 run : |
307277 echo "license: gpl-2.0" > some.file
308278 python -m venv venv
309279 venv/Scripts/python.exe -m pip install --upgrade pip
310- for f in `find dist -type f -name "*${{ matrix.pyver }}*"`; \
280+ for f in `find dist -type f -name "licensedcode*.whl"`; \
281+ do \
282+ venv/Scripts/python.exe -m pip install --force-reinstall "$f" ; \
283+ done
284+ for f in `find dist -type f -name "scancode_toolkit-*.whl"`; \
311285 do \
312286 venv/Scripts/python.exe -m pip install --force-reinstall "$f[full]" ; \
313287 venv/Scripts/scancode -clipeu --json-pp - some.file ; \
@@ -454,6 +428,7 @@ jobs:
454428 - build_scancode_for_release_windows
455429 - build_scancode_for_release_linux
456430 - build_scancode_for_release_macos
431+ - build_scancode_wheels_sdist_for_pypi
457432
458433 runs-on : ubuntu-24.04
459434 defaults :
@@ -559,6 +534,12 @@ jobs:
559534 name : windows_app_py_3.14
560535 path : dist
561536
537+ - name : Download scancode and licensedcode wheels
538+ uses : actions/download-artifact@v4
539+ with :
540+ name : wheels_sdist
541+ path : dist
542+
562543 - name : Mock GH release
563544 run : |
564545 ls -al dist
@@ -573,8 +554,7 @@ jobs:
573554 publish_to_pypi :
574555 name : Publish to PyPI
575556 needs :
576- - build_scancode_wheel_for_pypi
577- - build_scancode_sdist_for_pypi
557+ - build_scancode_wheels_sdist_for_pypi
578558 - smoke_test_install_and_run_pypi_wheels_on_windows
579559 - smoke_test_install_and_run_pypi_wheels_on_posix
580560 - publish_to_gh_release
@@ -585,26 +565,23 @@ jobs:
585565 defaults :
586566 run :
587567 shell : bash
588- strategy :
589- fail-fast : false
590- matrix :
591- dist_names : ["wheels-3.10", "wheels-3.11", "wheels-3.12", "wheels-3.13", "wheels-3.14", "sdists"]
592568
593569 steps :
594570 - name : Set up Python
595571 uses : actions/setup-python@v5
596572 with :
597573 python-version : 3.14
598574
599- - name : Download a single artifact
575+ - name : scancode and licensedcode wheels
600576 uses : actions/download-artifact@v4
601577 with :
602- name : ${{ matrix.dist_names }}
578+ name : wheels_sdist
603579 path : dist
604580
605581 - name : Mock PyPI upload
606582 run : |
607583 ls -al dist
608584
609585 - name : Publish distributions to PyPI
586+ if : startsWith(github.ref, 'refs/tags')
610587 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments