19
19
- ' c/*.[ch]p?p?'
20
20
# Manual run
21
21
workflow_dispatch :
22
+ release :
23
+ types :
24
+ - published
22
25
23
26
concurrency :
24
27
group : ${{ github.workflow }}-${{ github.ref }}
@@ -102,7 +105,7 @@ jobs:
102
105
- name : Publish artifacts
103
106
uses : actions/upload-artifact@v4
104
107
with :
105
- name : dist-${{ matrix.os }}-${{ matrix.python-version }}
108
+ name : moocore- dist-${{ matrix.os }}-${{ matrix.python-version }}
106
109
path : python/dist/
107
110
108
111
build-doc :
@@ -229,9 +232,31 @@ jobs:
229
232
230
233
- uses : actions/upload-artifact@v4
231
234
with :
232
- name : wheels-${{ matrix.os }}-${{ matrix.python-version }}
235
+ name : moocore- wheels-${{ matrix.os }}-${{ matrix.python-version }}
233
236
path : wheelhouse/*.whl
234
237
238
+ upload_pypi :
239
+ name : Publish Python 🐍 distribution 📦 to PyPI
240
+ needs : [wheels, build-package]
241
+ runs-on : ubuntu-latest
242
+ environment : pypi
243
+ permissions :
244
+ id-token : write
245
+ if : github.event_name == 'release' && github.event.action == 'published'
246
+ # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
247
+ # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
248
+ steps :
249
+ - uses : actions/download-artifact@v4
250
+ with :
251
+ # unpacks all moocore artifacts into dist/
252
+ pattern : moocore-*
253
+ path : dist
254
+ merge-multiple : true
255
+
256
+ - uses : pypa/gh-action-pypi-publish@release/v1
257
+ with :
258
+ # To test: repository-url: https://test.pypi.org/legacy/
259
+
235
260
upload :
236
261
name : Store wheels
237
262
needs : wheels
@@ -244,7 +269,7 @@ jobs:
244
269
- uses : actions/download-artifact@v4
245
270
with :
246
271
path : wheelhouse
247
- pattern : wheels-*
272
+ pattern : moocore- wheels-*
248
273
merge-multiple : true
249
274
250
275
- name : List wheels
0 commit comments