49
49
strategy :
50
50
matrix :
51
51
py-version : ["3.8", "3.9"]
52
- os : [ubuntu-22.04, windows-2019, macOS-13, macOS- 15]
52
+ os : [ubuntu-22.04, windows-2019, macOS-15]
53
53
fail-fast : false
54
54
runs-on : ${{ matrix.os }}
55
55
needs : generate-wrapper
@@ -158,52 +158,40 @@ jobs:
158
158
with :
159
159
token : ${{ secrets.GITHUB_TOKEN }}
160
160
deploy_pypi :
161
- # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
161
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
162
162
runs-on : " ubuntu-22.04"
163
163
permissions :
164
164
id-token : write
165
165
needs : ["py3p8_linux_sdist", "build"]
166
166
steps :
167
- - uses : actions/checkout@v4
168
- - name : check tag
169
- run : |
170
- echo "TAG_VERSION=$(git describe --tags)" >> $GITHUB_ENV
171
- echo "PKG_VERSION=$(python setup.py --version --quiet | tail -n1)" >> $GITHUB_ENV
172
- echo ${{ env.TAG_VERSION }}
173
- echo ${{ env.PKG_VERSION }}
174
- # if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then echo "Tag Version ($TAG_VERSION) != Package Version ($PKG_VERSION)" && exit 1; fi
175
- # echo "$TAG_VERSION is valid"
176
167
- name : download python source dist artifacts
177
168
uses : actions/download-artifact@v4
178
169
with :
179
170
path : python-wrapper/dist
180
171
name : py_source_dist
181
- - name : check artifacts after sdist download
182
- run : |
183
- cd python-wrapper/dist
184
- ls -al
185
- - name : download python build artifacts
172
+ - name : download win python build artifacts
186
173
uses : actions/download-artifact@v4
187
174
with :
188
175
path : python-wrapper/dist
189
176
merge-multiple : true
190
- pattern : py_*_build
191
- - name : check artifacts
192
- run : |
193
- cd python-wrapper/dist
194
- ls -al
195
- # - name: Publish package distributions to PyPI
196
- # uses: pypa/gh-action-pypi-publish@release/v1
197
- # with:
198
- # password: ${{ secrets.PYPI_API_TOKEN }}
199
-
177
+ pattern : py_*windows*_build
178
+ - name : download mac build artifacts
179
+ uses : actions/download-artifact@v4
180
+ with :
181
+ path : python-wrapper/dist
182
+ merge-multiple : true
183
+ pattern : py_*macOS*_build
184
+ # pypi does not accept the linux wheels with _x86_64, thus not uploading any linux wheels
185
+ - name : Publish package distributions to PyPI
186
+ uses : pypa/gh-action-pypi-publish@release/v1
187
+ with :
188
+ password : ${{ secrets.PYPI_API_TOKEN }}
200
189
github-release :
201
190
name : Create GitHub Release and add signature for python packages
202
- # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
191
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
203
192
needs :
204
193
- build
205
194
- py3p8_linux_sdist
206
- - deploy_pypi
207
195
runs-on : ubuntu-22.04
208
196
defaults :
209
197
run :
@@ -229,17 +217,15 @@ jobs:
229
217
env :
230
218
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
231
219
run : |
232
- echo ${{ github.ref_name }}
233
- # if [[ "$(gh release view '${{ github.ref_name }}' 2>&1)" == "release not found" ]]; then
234
- # gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes ""
235
- # fi
220
+ if [[ "$(gh release view '${{ github.ref_name }}' 2>&1)" == "release not found" ]]; then
221
+ gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes ""
222
+ fi
236
223
- name : Upload artifacts to GitHub Release
237
224
env :
238
225
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
239
226
# Upload release artifacts before the signing, such that artifacts are still uploaded if signing fails
240
- run : |
241
- ls -al dist/**
242
- # gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
227
+ run : |
228
+ gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
243
229
- name : Sign the dists with Sigstore
244
230
uses : sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46
245
231
with :
@@ -250,6 +236,5 @@ jobs:
250
236
env :
251
237
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
252
238
# upload sigstore-produced signatures and certificates from dist
253
- run : |
254
- ls -al dist/*.sigstore.json
255
- # gh release upload '${{ github.ref_name }}' dist/*.sigstore.json --repo '${{ github.repository }}'
239
+ run : |
240
+ gh release upload '${{ github.ref_name }}' dist/*.sigstore.json --repo '${{ github.repository }}'
0 commit comments