@@ -16,13 +16,31 @@ jobs:
1616
1717 - name : Check version numbers
1818 run : ./version.sh
19-
19+
20+ make_sdist :
21+ name : Make SDist
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ submodules : true
27+
28+ - name : Build SDist
29+ run : pipx run build --sdist
30+
31+ - uses : actions/upload-artifact@v4
32+ with :
33+ name : cibw-sdist
34+ path : dist/*.tar.gz
35+
2036 package-python :
2137 strategy :
2238 fail-fast : false
2339 matrix :
2440 os :
2541 - ubuntu-latest
42+ - macos-13
43+ - macos-latest
2644
2745 runs-on : ${{ matrix.os }}
2846
@@ -32,42 +50,37 @@ jobs:
3250 with :
3351 submodules : ' true'
3452
35- - name : Upgrade pip and build
36- run : |
37- python3 -m pip install --upgrade pip
38- python3 -m pip install --upgrade build
53+ - name : Build wheels
54+ uses : pypa/cibuildwheel@v2.22.0
3955
40- - name : Build wheel
41- run : python3 -m build
42-
4356 - name : Upload binary wheel
4457 uses : actions/upload-artifact@v4
4558 with :
46- name : dist
47- path : ./dist /*.whl
59+ name : cibw-wheels-${{ matrix.os }}
60+ path : ./wheelhouse /*.whl
4861
4962 deploy :
63+ environment :
64+ name : pypi
65+ url : https://pypi.org/p/libbash
5066 needs :
5167 - check-version-numbers
5268 - package-python
69+ permissions :
70+ id-token : write
5371 runs-on : ubuntu-latest
5472 if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
5573
5674 steps :
5775 - name : Download distributions
5876 uses : actions/download-artifact@v4
77+ with :
78+ path : dist
79+ pattern : cibw-*
80+ merge-multiple : true
5981
6082 - name : Deploy test distribution to Test PyPI
6183 uses : pypa/gh-action-pypi-publish@release/v1
6284 with :
63- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
64- verbose : true
65- repository_url : https://test.pypi.org/legacy/
66- skip_existing : true
67-
68- - name : Deploy tagged release on PyPI
69- if : startsWith(github.ref, 'refs/tags')
70- uses : pypa/gh-action-pypi-publish@release/v1
71- with :
72- password : ${{ secrets.PYPI_API_TOKEN }}
7385 verbose : true
86+ skip_existing : true
0 commit comments