@@ -28,20 +28,15 @@ jobs:
28
28
name : Build wheels
29
29
needs :
30
30
- test
31
- runs-on : ${{ matrix.platform.image }}
31
+ runs-on : ${{ matrix.platform }}
32
32
strategy :
33
33
fail-fast : false
34
34
matrix :
35
- platform :
36
- - image : ' windows-latest'
37
- name : ' windows'
38
- - image : ' ubuntu-latest'
39
- name : ' linux'
35
+ platform : [ 'windows-latest', 'ubuntu-latest' ]
40
36
python-version : [ 'cp38', 'cp39', 'cp310', 'cp311', 'cp312' ]
41
37
timeout-minutes : 35
42
38
env :
43
39
CONAN_REVISIONS_ENABLED : 1
44
- TARGET_ID : libcosimpy-${{ github.ref_name }}-${{ matrix.platform.name }}-${{ matrix.python-version }}
45
40
steps :
46
41
- uses : actions/checkout@v3
47
42
- uses : actions/setup-python@v5
@@ -51,26 +46,31 @@ jobs:
51
46
uses : pypa/cibuildwheel@v2.19.2
52
47
env :
53
48
CIBW_BUILD : " ${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64"
49
+ - name : Twine check
50
+ run : |
51
+ pip install twine
52
+ twine check --strict ./wheelhouse/*
54
53
- uses : actions/upload-artifact@v4
55
54
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
56
55
name : Upload artifact (wheels)
57
56
with :
58
- name : ${{ env.TARGET_ID }}-wheel
57
+ name : libcosimpy- ${{ github.ref_name }}-${{ runner.os }}-${{ matrix.python-version }}-wheel
59
58
path : ./wheelhouse/*.whl
60
59
61
60
build_source :
62
61
name : Build source
63
62
needs :
64
63
- test
65
64
runs-on : ' ubuntu-latest'
66
- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
67
65
steps :
68
66
- uses : actions/checkout@v3
69
- - name : Install build
70
- run : pip install build
71
67
- name : Build source
72
- run : python -m build --sdist
68
+ run : |
69
+ pip install build twine
70
+ python -m build --sdist
71
+ twine check --strict ./dist/*
73
72
- uses : actions/upload-artifact@v4
73
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
74
74
name : Upload artifact (source)
75
75
with :
76
76
name : libcosimpy-${{ github.ref_name }}-source
88
88
pattern : " *-wheel"
89
89
merge-multiple : true
90
90
path : ./dist/
91
- - name : Twine check
92
- run : |
93
- pip install twine
94
- twine check --strict ./dist/*
95
91
- uses : pypa/gh-action-pypi-publish@v1.9.0
96
92
with :
97
93
user : __token__
0 commit comments