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,48 +158,30 @@ 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
172
- name : download 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
177
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
-
178
+ - name : Publish package distributions to PyPI
179
+ uses : pypa/gh-action-pypi-publish@release/v1
180
+ with :
181
+ password : ${{ secrets.PYPI_API_TOKEN }}
200
182
github-release :
201
183
name : Create GitHub Release and add signature for python packages
202
- # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
184
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
203
185
needs :
204
186
- build
205
187
- py3p8_linux_sdist
@@ -229,17 +211,15 @@ jobs:
229
211
env :
230
212
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
231
213
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
214
+ if [[ "$(gh release view '${{ github.ref_name }}' 2>&1)" == "release not found" ]]; then
215
+ gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes ""
216
+ fi
236
217
- name : Upload artifacts to GitHub Release
237
218
env :
238
219
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
239
220
# 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 }}'
221
+ run : |
222
+ gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'
243
223
- name : Sign the dists with Sigstore
244
224
uses : sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46
245
225
with :
@@ -250,6 +230,5 @@ jobs:
250
230
env :
251
231
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
252
232
# 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 }}'
233
+ run : |
234
+ gh release upload '${{ github.ref_name }}' dist/*.sigstore.json --repo '${{ github.repository }}'
0 commit comments