Skip to content

Commit dcf6168

Browse files
committed
ci(cocoapods-publish): allow manual release trigger and schedule release from publish library workflow
1 parent e85490c commit dcf6168

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/cocoapods-publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ name: Cocoapods publish
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches: [ main ]
75

86
jobs:
9-
# Only runs on the version update commit
10-
# We need the new podspec available to publish to CocoaPods
7+
# Runs after the main publish workflow completes successfully
8+
# Triggered explicitly by publish.yml via `gh workflow run` (only on real releases, not dry-runs)
119
publish-to-cocoapods:
12-
if: "contains(github.event.head_commit.author.email, '[email protected]')"
1310
name: Publish to CocoaPods
1411
runs-on: macos-latest
1512

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ jobs:
316316
run: |
317317
git push origin HEAD:main --follow-tags --tags
318318
319+
- name: Trigger CocoaPods publish
320+
if: ${{ !inputs.dry-run }}
321+
run: gh workflow run cocoapods-publish.yml
322+
env:
323+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
324+
319325
- name: Dry-run summary
320326
if: ${{ inputs.dry-run }}
321327
run: |

0 commit comments

Comments
 (0)