@@ -16,13 +16,13 @@ jobs:
16
16
matrix :
17
17
os : [
18
18
ubuntu-latest,
19
- windows-latest,
20
- macos-13, # latest non-beta version
19
+ # windows-latest,
20
+ # macos-13, # latest non-beta version
21
21
] # see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
22
22
python-version : [
23
23
' 3.10' ,
24
24
' 3.11' ,
25
- ' 3.12'
25
+ # '3.12'
26
26
] # see https://devguide.python.org/versions/
27
27
28
28
steps :
@@ -42,12 +42,49 @@ jobs:
42
42
- name : Install maturin
43
43
run : python -m pip install maturin
44
44
45
+ - name : Build source distribution # do this only once
46
+ run : |
47
+ cd lakers-python
48
+ maturin build --sdist --out wheelhouse
49
+ if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
50
+
45
51
- name : Build wheels
46
52
run : |
47
53
cd lakers-python
48
- maturin build --out wheelhouse
54
+ maturin build --release -- out wheelhouse
49
55
50
56
- uses : actions/upload-artifact@v4
51
57
with :
52
58
name : wheel-${{ matrix.os }}-python-${{ matrix.python-version }}
53
- path : ./lakers-python/wheelhouse/*.whl
59
+ path : ./lakers-python/wheelhouse/lakers_python*
60
+
61
+ release :
62
+ runs-on : ubuntu-latest
63
+ needs : [build-python-wheels]
64
+ # if: >-
65
+ # github.event_name == 'push' &&
66
+ # startsWith(github.event.ref, 'refs/tags')
67
+
68
+ steps :
69
+ - uses : actions/checkout@v4
70
+
71
+ - name : set up python
72
+ uses : actions/setup-python@v5
73
+ with :
74
+ python-version : ' 3.10'
75
+
76
+ - run : pip install -U twine
77
+
78
+ - name : get wheelhouse artifacts
79
+ uses : actions/download-artifact@v4
80
+ with :
81
+ path : wheelhouse
82
+
83
+ - run : ls -lah ./wheelhouse/*/lakers_python*
84
+ - run : twine check ./wheelhouse/*/lakers_python*
85
+
86
+ - name : upload to pypi
87
+ run : twine upload wheelhouse/*
88
+ env :
89
+ TWINE_USERNAME : __token__
90
+ TWINE_PASSWORD : ${{ secrets.PYPI_UPLOAD_TOKEN }}
0 commit comments