github: auto-deploy CocoaPods on release#9955
Conversation
The CocoaPods deploy workflow was workflow_dispatch-only, so a new release never published the pod automatically. Fold the deploy into release.yml as a job that needs build-ios, mirroring how sonatype-publish hangs off build-android. The standalone workflow is renamed to cocoapods-manual-deploy.yml and kept as a fallback for re-runs. Release guide updated accordingly.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| jobs: | ||
| cocoapods-deploy: | ||
| name: cocoapods-deploy | ||
| cocoapods-manual-deploy: |
There was a problem hiding this comment.
Renamed for disambiguation with job in release.yml
| cocoapods-deploy: | ||
| name: cocoapods-deploy | ||
| runs-on: macos-14 | ||
| needs: [build-ios] |
There was a problem hiding this comment.
build-ios job guarantees the asset upload step has completed before the Cocoapods deploy runs.
|
cc @bejado as it might interest you |
|
Thank you! This looks good to me so far. We're not doing a release this week, but I'll take a closer look and see if I can test it out with next week's release. |
Summary
The CocoaPods deploy workflow was
workflow_dispatch-only, so a new GitHub release never triggered it: the pod had to be published manually after every release. This PR wires the deploy into the release flow.cocoapods-deployjob to.github/workflows/release.ymlthatneeds: [build-ios]and runs on thereleaseevent (and onworkflow_dispatchwithplatform=ios). This mirrors the existingsonatype-publishjob, which hangs offbuild-androidfor the Maven publish..github/workflows/cocopods-deploy.yml→.github/workflows/cocoapods-manual-deploy.yml(also fixing the originalcocopodstypo) and reframes it as a manual fallback for re-runs. The job inside is renamed tococoapods-manual-deployto disambiguate from the in-release one.docs_src/src_mdbook/src/release/guide.mdsection 11 so the release guide describes CocoaPods as automatic, with the manual workflow documented as a fallback.The dependency chain is correct:
pod trunk pushvalidatesspec.source(https://github.com/google/filament/releases/download/${TAG}/filament-${TAG}-ios.tgz), andneeds: [build-ios]guarantees the asset upload step has completed before the deploy runs.