Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 44 additions & 3 deletions .github/workflows/ios-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Install Cocoapods
run: gem install cocoapods
bundler-cache: false

- name: Install gems
run: bundle install

- name: clean cocaopods cache and lint
run: bundle exec fastlane ios clean_and_lint
Expand All @@ -58,5 +59,45 @@ jobs:
- name: push pods to trunk
run: bundle exec fastlane ios pod_trunk_push

- name: verify cocoapods publication
run: |
set -e
# Retries with linear backoff distinguish "trunk is briefly down" (5xx, 0)
# from "pod isn't published" (404). 404 fails fast, transient errors retry up to ~75s.
for pod in Iterable-iOS-SDK Iterable-iOS-AppExtensions; do
echo "Checking trunk for $pod $VERSION..."
verified=false
for attempt in 1 2 3 4 5; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://trunk.cocoapods.org/api/v1/pods/$pod/versions/$VERSION")
case "$status" in
200)
echo "$pod $VERSION confirmed on trunk."
verified=true
break
;;
404)
echo "::error::$pod $VERSION is not available on CocoaPods trunk (HTTP 404). The pod_trunk_push step likely failed or COCOAPODS_TRUNK_TOKEN is invalid."
exit 1
;;
*)
echo "Attempt $attempt got HTTP $status, retrying..."
sleep $((attempt * 5))
;;
esac
done
if [ "$verified" != "true" ]; then
echo "::error::Could not reach CocoaPods trunk to verify $pod $VERSION after 5 attempts."
exit 1
fi
done

- name: slack notification
run: bundle exec fastlane ios slack_message version:$VERSION changelog_section:$CHANGELOG_SECTION slack_webhook:$SLACK_WEBHOOK

- name: slack failure notification
if: failure()
run: |
run_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
payload=$(printf '{"text":":alert: iOS SDK release %s failed (attempt %s). Run: %s"}' \
"$VERSION" "${{ github.run_attempt }}" "$run_url")
curl -sS -X POST -H 'Content-type: application/json' --data "$payload" "$SLACK_WEBHOOK"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tests/business-critical-integration/screenshots
.claude

*~
Gemfile.lock
Podfile.lock
Pods/

Expand Down
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
source "https://rubygems.org"

gem "cocoapods"
gem "fastlane"
# Pinned to the current minor to allow patch-level bug fixes while protecting
# release day from a major-version upstream regression. Bump the ceiling
# intentionally as a separate change after testing locally.
gem "cocoapods", "~> 1.16"
gem "fastlane", "~> 2.236"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
308 changes: 0 additions & 308 deletions Gemfile.lock

This file was deleted.

Loading
Loading