Skip to content

Commit 9e9227b

Browse files
committed
touched up ci-cd
1 parent 22a7603 commit 9e9227b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/ci-cd.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,33 @@ jobs:
288288
needs: [devcheck, test]
289289
runs-on: ubuntu-latest
290290
steps:
291+
291292
- uses: actions/checkout@v3
292293
with:
293294
submodules: recursive
294295
fetch-depth: 0
296+
295297
- name: Set up Python
296298
uses: actions/setup-python@v4
297299
with:
298300
python-version: '3.11'
301+
299302
- name: Install build tools
300303
run: python -m pip install build twine
304+
301305
- name: Build source and wheel distributions
302306
run: python -m build ./related-packages/fileformats
307+
303308
- name: Check distributions
304309
run: twine check ./related-packages/fileformats/dist/*
310+
305311
- name: Check for PyPI token on tag
306312
id: deployable
307-
if: github.event_name == 'release'
313+
if: github.event_name == 'release' || github.event_name == 'repository_dispatch'
308314
env:
309315
PYPI_API_TOKEN: "${{ secrets.PYPI_FILEFORMATS_API_TOKEN }}"
310316
run: if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
317+
311318
- name: Upload to PyPI
312319
if: steps.deployable.outputs.DEPLOY
313320
uses: pypa/gh-action-pypi-publish@release/v1
@@ -320,26 +327,33 @@ jobs:
320327
needs: [deploy-fileformats]
321328
runs-on: ubuntu-latest
322329
steps:
330+
323331
- uses: actions/checkout@v3
324332
with:
325333
submodules: recursive
326334
fetch-depth: 0
335+
327336
- name: Set up Python
328337
uses: actions/setup-python@v4
329338
with:
330339
python-version: '3.11'
340+
331341
- name: Install build tools
332342
run: python -m pip install build twine
343+
333344
- name: Build source and wheel distributions
334345
run: python -m build ./related-packages/fileformats-extras
346+
335347
- name: Check distributions
336348
run: twine check ./related-packages/fileformats-extras/dist/*
349+
337350
- name: Check for PyPI token on tag
338351
id: deployable
339-
if: github.event_name == 'release'
352+
if: github.event_name == 'release' || github.event_name == 'repository_dispatch'
340353
env:
341354
PYPI_API_TOKEN: "${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }}"
342355
run: if [ -n "$PYPI_API_TOKEN" ]; then echo "DEPLOY=true" >> $GITHUB_OUTPUT; fi
356+
343357
- name: Upload to PyPI
344358
if: steps.deployable.outputs.DEPLOY
345359
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)