@@ -288,26 +288,33 @@ jobs:
288
288
needs : [devcheck, test]
289
289
runs-on : ubuntu-latest
290
290
steps :
291
+
291
292
- uses : actions/checkout@v3
292
293
with :
293
294
submodules : recursive
294
295
fetch-depth : 0
296
+
295
297
- name : Set up Python
296
298
uses : actions/setup-python@v4
297
299
with :
298
300
python-version : ' 3.11'
301
+
299
302
- name : Install build tools
300
303
run : python -m pip install build twine
304
+
301
305
- name : Build source and wheel distributions
302
306
run : python -m build ./related-packages/fileformats
307
+
303
308
- name : Check distributions
304
309
run : twine check ./related-packages/fileformats/dist/*
310
+
305
311
- name : Check for PyPI token on tag
306
312
id : deployable
307
- if : github.event_name == 'release'
313
+ if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
308
314
env :
309
315
PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_API_TOKEN }}"
310
316
run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
317
+
311
318
- name : Upload to PyPI
312
319
if : steps.deployable.outputs.DEPLOY
313
320
uses : pypa/gh-action-pypi-publish@release/v1
@@ -320,26 +327,33 @@ jobs:
320
327
needs : [deploy-fileformats]
321
328
runs-on : ubuntu-latest
322
329
steps :
330
+
323
331
- uses : actions/checkout@v3
324
332
with :
325
333
submodules : recursive
326
334
fetch-depth : 0
335
+
327
336
- name : Set up Python
328
337
uses : actions/setup-python@v4
329
338
with :
330
339
python-version : ' 3.11'
340
+
331
341
- name : Install build tools
332
342
run : python -m pip install build twine
343
+
333
344
- name : Build source and wheel distributions
334
345
run : python -m build ./related-packages/fileformats-extras
346
+
335
347
- name : Check distributions
336
348
run : twine check ./related-packages/fileformats-extras/dist/*
349
+
337
350
- name : Check for PyPI token on tag
338
351
id : deployable
339
- if : github.event_name == 'release'
352
+ if : github.event_name == 'release' || github.event_name == 'repository_dispatch'
340
353
env :
341
354
PYPI_API_TOKEN : " ${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }}"
342
355
run : if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
356
+
343
357
- name : Upload to PyPI
344
358
if : steps.deployable.outputs.DEPLOY
345
359
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments