Conversation
Adds notify-wrappers.yml: on a published (non-prerelease) release it
sends a native-sdk-release repository_dispatch ({platform, version}) to
Superwall-Flutter, expo-superwall and Superwall-KMP so they can open a
bump PR. Needs the WRAPPER_DISPATCH_TOKEN secret.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015S6mZpaJyu9J5v7NPv2WCS
|
This PR does not match any of the 1 configured review trigger rule. |
There was a problem hiding this comment.
ℹ️ No critical issues. One timing edge case is noted inline.
Reviewed changes
Reviewed the new notify-wrappers.yml workflow, which tells the Flutter, Expo and KMP wrappers about stable iOS releases.
- Trigger and filtering: The workflow runs on
release: publishedand on manualworkflow_dispatch. It skips prereleases and any tag that is notx.y.z. Existing iOS tags are plainx.y.z(for example4.17.0), so the regex matches them. - Dispatch loop: For each wrapper repo it calls
gh api repos/$repo/dispatcheswith{platform: ios, version}in the payload. If one repo fails, it still tries the rest and then exits non-zero. Untrusted values reach the script throughenv, not inline${{ }}, so there is no script-injection risk.
claude-opus-5.5 | 𝕏
| echo "::notice::'$VERSION' is not a stable x.y.z version, not notifying wrappers." | ||
| exit 0 | ||
| fi | ||
| failed=0 |
There was a problem hiding this comment.
tag-version.yml runs pod trunk push and the Slack "please create a release" ping at the same time, since both only depend on tag. Trunk push is a macOS lint and build that can take a while or fail outright, so a release can be published before the pod exists on CocoaPods. When that happens, Flutter and Expo get a bump PR whose pod install can't resolve SuperwallKit at that version. Consider waiting for the version to show up on trunk before dispatching. The manual workflow_dispatch path can still be used to re-send the event.
Technical details
# Dispatch can race the CocoaPods trunk push
## Affected sites
- .github/workflows/notify-wrappers.yml:49 — dispatches right after the version check passes
- .github/workflows/tag-version.yml — `cocoapods` and `slack` jobs both `needs: tag` and run in parallel
## Required outcome
- Wrappers that consume iOS through CocoaPods are only notified once `SuperwallKit $VERSION` can be resolved from trunk. If it never appears, the run fails visibly instead of opening bump PRs that can't build.
## Suggested approach
Before the loop, poll the trunk API with a bounded timeout:
```bash
for _ in $(seq 1 60); do
curl -sfo /dev/null "https://trunk.cocoapods.org/api/v1/pods/SuperwallKit/specs/$VERSION" && break
sleep 30
done || true
curl -sfo /dev/null "https://trunk.cocoapods.org/api/v1/pods/SuperwallKit/specs/$VERSION" \
|| { echo "::error::SuperwallKit $VERSION not on CocoaPods trunk"; exit 1; }
```
CDN propagation can lag trunk slightly, but this closes most of the window.
Changes in this pull request
.github/workflows/notify-wrappers.yml. When a stable release is published, it sends anative-sdk-releaserepository_dispatch({platform: "ios", version}) to Superwall-Flutter, expo-superwall and Superwall-KMP. Each wrapper'snative-sdk-bump.ymlthen opens a bump PR, and an agent pushes any integration work onto it.release: publishedbecause iOS releases are created by hand.createdwould also fire for drafts. Prereleases and non-x.y.ztags are skipped. It can also be run by hand (workflow_dispatchwith a version).Setup: needs a
WRAPPER_DISPATCH_TOKENsecret, a fine-grained PAT or App token with Contents: read & write on the three wrapper repos.GITHUB_TOKENcan't dispatch to other repos.Counterparts: superwall/Superwall-Android#473, plus the
native-sdk-bump.ymlPRs in Superwall-Flutter, expo-superwall and Superwall-KMP.Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes. Not applicable: no customer-facing change.swiftlintin the main directory and fixed any issues. Not applicable: no Swift changes.🤖 Generated with Claude Code
https://claude.ai/code/session_015S6mZpaJyu9J5v7NPv2WCS
Generated by Claude Code