From 6db86f51cc4d40e19de35b84c151445e01ae1256 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 14:58:04 +0000 Subject: [PATCH 1/6] Add workflow to publish to CocoaPods --- .github/workflows/publish-to-cocoapods.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/publish-to-cocoapods.yml diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml new file mode 100644 index 0000000..858113f --- /dev/null +++ b/.github/workflows/publish-to-cocoapods.yml @@ -0,0 +1,23 @@ +name: Publish SDK to CocoaPods + +on: + push: + tags: + - "*" + +jobs: + publish: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Deploy to Cocoapods + run: | + set -eo pipefail + pod lib lint --allow-warnings + pod trunk push --allow-warnings + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} From a43afb73711dc9d2e999611a11ed60755e242bf6 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 16:07:52 +0000 Subject: [PATCH 2/6] Add setup-ruby action --- .github/workflows/publish-to-cocoapods.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml index 858113f..4895e54 100644 --- a/.github/workflows/publish-to-cocoapods.yml +++ b/.github/workflows/publish-to-cocoapods.yml @@ -4,6 +4,8 @@ on: push: tags: - "*" + branches: + - '*' jobs: publish: @@ -11,13 +13,15 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + - name: Install Cocoapods run: gem install cocoapods - - name: Deploy to Cocoapods - run: | - set -eo pipefail - pod lib lint --allow-warnings - pod trunk push --allow-warnings - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + # - name: Deploy to Cocoapods + # run: | + # set -eo pipefail + # pod lib lint --allow-warnings + # pod trunk push --allow-warnings + # env: + # COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} From 342ef29cc27906b3ef5554293f247751829f7aa7 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 16:09:23 +0000 Subject: [PATCH 3/6] Test without any push filter --- .github/workflows/publish-to-cocoapods.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml index 4895e54..91a2c72 100644 --- a/.github/workflows/publish-to-cocoapods.yml +++ b/.github/workflows/publish-to-cocoapods.yml @@ -2,10 +2,6 @@ name: Publish SDK to CocoaPods on: push: - tags: - - "*" - branches: - - '*' jobs: publish: From 7cc8cf386146e3f10f4cca08deba8ec5ea5afde8 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 16:10:37 +0000 Subject: [PATCH 4/6] Add ruby version --- .github/workflows/publish-to-cocoapods.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml index 91a2c72..918c390 100644 --- a/.github/workflows/publish-to-cocoapods.yml +++ b/.github/workflows/publish-to-cocoapods.yml @@ -10,6 +10,8 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' - name: Install Cocoapods run: gem install cocoapods From e36ffefe73bf3883b4c32ab431049b6c9b393047 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 16:11:25 +0000 Subject: [PATCH 5/6] Re-add push filter for tags only --- .github/workflows/publish-to-cocoapods.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml index 918c390..8fef183 100644 --- a/.github/workflows/publish-to-cocoapods.yml +++ b/.github/workflows/publish-to-cocoapods.yml @@ -2,6 +2,8 @@ name: Publish SDK to CocoaPods on: push: + tags: + - '*' jobs: publish: From 3e525197db4ed94dbbb7225b0a1e81a73641dc12 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 21 Nov 2024 16:34:22 +0000 Subject: [PATCH 6/6] Uncomment deploy step --- .github/workflows/publish-to-cocoapods.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-to-cocoapods.yml b/.github/workflows/publish-to-cocoapods.yml index 8fef183..89bb33b 100644 --- a/.github/workflows/publish-to-cocoapods.yml +++ b/.github/workflows/publish-to-cocoapods.yml @@ -18,10 +18,10 @@ jobs: - name: Install Cocoapods run: gem install cocoapods - # - name: Deploy to Cocoapods - # run: | - # set -eo pipefail - # pod lib lint --allow-warnings - # pod trunk push --allow-warnings - # env: - # COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + - name: Deploy to Cocoapods + run: | + set -eo pipefail + pod lib lint --allow-warnings + pod trunk push --allow-warnings + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}