@@ -349,6 +349,7 @@ jobs:
349
349
- client_gen
350
350
if : |
351
351
always() &&
352
+ needs.setup.outputs.RUN_GEN == 'true' &&
352
353
needs.setup.outputs.RUN_MACOS_KOTLIN_BUILD == 'true' &&
353
354
!contains(needs.*.result, 'cancelled') &&
354
355
!contains(needs.*.result, 'failure')
@@ -412,8 +413,6 @@ jobs:
412
413
- setup
413
414
- client_gen
414
415
- client_gen_javascript
415
- - swift_cts_macos
416
- - kotlin_build_macos
417
416
if : |
418
417
always() &&
419
418
!contains(needs.*.result, 'cancelled') &&
@@ -422,6 +421,7 @@ jobs:
422
421
pull-requests : write
423
422
outputs :
424
423
success : ${{ steps.setoutput.outputs.success }}
424
+ generatedCommit : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT || github.event.pull_request.head.ref }}
425
425
steps :
426
426
- uses : actions/checkout@v4
427
427
with :
@@ -495,25 +495,6 @@ jobs:
495
495
| 🍃 Generated commit | [`${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}`](${{ github.event.pull_request.base.repo.html_url }}/commit/${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}) |
496
496
| 🌲 Generated branch | [`generated/${{ github.head_ref }}`](${{ github.event.pull_request.base.repo.html_url }}/tree/generated/${{ github.head_ref }}) |
497
497
498
- - name : Spread generation to each repository
499
- id : spreadGeneration
500
- if : github.ref == 'refs/heads/main'
501
- run : yarn workspace scripts spreadGeneration
502
- env :
503
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
504
-
505
- - name : Wait for all release CI
506
- if : github.ref == 'refs/heads/main'
507
- run : yarn workspace scripts waitForAllReleases ${{ steps.spreadGeneration.outputs.PUSHED_LANGUAGES }}
508
- env :
509
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
510
-
511
- - name : Push specs to algolia documentation
512
- if : github.ref == 'refs/heads/main'
513
- run : yarn workspace scripts pushToAlgoliaDoc
514
- env :
515
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
516
-
517
498
- name : Set output
518
499
id : setoutput
519
500
run : echo "success=true" >> "$GITHUB_OUTPUT"
@@ -523,10 +504,50 @@ jobs:
523
504
timeout-minutes : 10
524
505
needs :
525
506
- codegen
507
+ - swift_cts_macos
508
+ - kotlin_build_macos
526
509
if : always()
527
510
steps :
528
511
- run : |
529
512
if [[ "${{ needs.codegen.outputs.success }}" != "true" ]]; then
530
513
echo "codegen step didn't succeed"
531
514
exit 1
532
515
fi
516
+
517
+ push_and_release :
518
+ runs-on : ubuntu-22.04
519
+ timeout-minutes : 15
520
+ needs :
521
+ - codegen
522
+ - check_green
523
+ if : github.ref == 'refs/heads/main'
524
+ permissions :
525
+ pull-requests : write
526
+ steps :
527
+ - uses : actions/checkout@v4
528
+ with :
529
+ fetch-depth : 0
530
+ ref : ${{ needs.codegen.outputs.generatedCommit }}
531
+ token : ${{ secrets.ALGOLIA_BOT_TOKEN }}
532
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
533
+
534
+ - name : Setup
535
+ uses : ./.github/actions/setup
536
+ with :
537
+ type : minimal
538
+
539
+ - name : Spread generation to each repository
540
+ id : spreadGeneration
541
+ run : yarn workspace scripts spreadGeneration
542
+ env :
543
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
544
+
545
+ - name : Wait for all release CI
546
+ run : yarn workspace scripts waitForAllReleases ${{ steps.spreadGeneration.outputs.PUSHED_LANGUAGES }}
547
+ env :
548
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
549
+
550
+ - name : Push specs to algolia documentation
551
+ run : yarn workspace scripts pushToAlgoliaDoc
552
+ env :
553
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
0 commit comments