Skip to content

Commit cdc4b3b

Browse files
committed
Publish Tigrcorn packages with project-scoped jobs
1 parent 7c14201 commit cdc4b3b

1 file changed

Lines changed: 46 additions & 6 deletions

File tree

.github/workflows/publish-all-packages.yml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,24 @@ jobs:
386386
permissions:
387387
contents: read
388388
id-token: write
389+
strategy:
390+
fail-fast: false
391+
matrix:
392+
package:
393+
- tigrcorn
394+
- tigrcorn-asgi
395+
- tigrcorn-certification
396+
- tigrcorn-compat
397+
- tigrcorn-config
398+
- tigrcorn-contract
399+
- tigrcorn-core
400+
- tigrcorn-http
401+
- tigrcorn-observability
402+
- tigrcorn-protocols
403+
- tigrcorn-runtime
404+
- tigrcorn-security
405+
- tigrcorn-static
406+
- tigrcorn-transports
389407
steps:
390408
- name: Download Python distributions
391409
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
@@ -400,10 +418,12 @@ jobs:
400418
run: |
401419
set -euo pipefail
402420
shopt -s nullglob
403-
artifacts=(dist/*)
421+
package_slug="${{ matrix.package }}"
422+
package_slug="${package_slug//-/_}"
423+
artifacts=(dist/${package_slug}-*)
404424
if [[ ${#artifacts[@]} -eq 0 ]]; then
405-
echo "No Python distributions found in dist/." >&2
406-
exit 1
425+
echo "No Python distributions found for ${{ matrix.package }}; skipping."
426+
exit 0
407427
fi
408428
for artifact in "${artifacts[@]}"; do
409429
echo "Publishing ${artifact} to TestPyPI with trusted publishing."
@@ -423,6 +443,24 @@ jobs:
423443
permissions:
424444
contents: read
425445
id-token: write
446+
strategy:
447+
fail-fast: false
448+
matrix:
449+
package:
450+
- tigrcorn
451+
- tigrcorn-asgi
452+
- tigrcorn-certification
453+
- tigrcorn-compat
454+
- tigrcorn-config
455+
- tigrcorn-contract
456+
- tigrcorn-core
457+
- tigrcorn-http
458+
- tigrcorn-observability
459+
- tigrcorn-protocols
460+
- tigrcorn-runtime
461+
- tigrcorn-security
462+
- tigrcorn-static
463+
- tigrcorn-transports
426464
steps:
427465
- name: Download Python distributions
428466
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
@@ -437,10 +475,12 @@ jobs:
437475
run: |
438476
set -euo pipefail
439477
shopt -s nullglob
440-
artifacts=(dist/*)
478+
package_slug="${{ matrix.package }}"
479+
package_slug="${package_slug//-/_}"
480+
artifacts=(dist/${package_slug}-*)
441481
if [[ ${#artifacts[@]} -eq 0 ]]; then
442-
echo "No Python distributions found in dist/." >&2
443-
exit 1
482+
echo "No Python distributions found for ${{ matrix.package }}; skipping."
483+
exit 0
444484
fi
445485
for artifact in "${artifacts[@]}"; do
446486
echo "Publishing ${artifact} to PyPI with trusted publishing."

0 commit comments

Comments
 (0)