Skip to content

ci: automate RN SDK release - #214

Merged
AmalJossy merged 9 commits into
mainfrom
amal/rn-sdk-release-ci
Oct 27, 2026
Merged

AmalJossy merged 9 commits into
mainfrom
amal/rn-sdk-release-ci

Conversation

@AmalJossy

@AmalJossy AmalJossy commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Release CI for the RN SDK, adapted to trunk-based development on main. Based on the React Native SDK release CI plan; that doc still describes the development/staging/production model.

  • Pins: native-sdk: marker lines in android/build.gradle and the podspec (IOS_SDKS). scripts/apply-native-pins.sh is the only writer.
  • native-sdk-bump.yml: one native-sdk-released event per native release, carrying every SDK and variant it released ({platform, channel, pins: {scg: {release, debug}, loans: {...}}, source_url}), or run by hand. The release and the debug variant each get their own branch from main, named after their versions:
    • native staging → prerelease/<platform>-<sdk>-<version>[_<sdk>-<version>], e.g. prerelease/ios-scg-7.3.1-rc.1645_loans-7.6.1-rc.1650 and prerelease/ios-scg-7.3.1-rc-debug.1644_loans-7.6.1-rc-debug.1649.
    • native preview → preview/<platform>-<sdk>-<version>[...].
    • native production → release builds in one PR per platform into main (release/<platform>), so scg + loans from a shared-module change merge together; debug builds on a prerelease/ branch.
  • publish.yml (name kept for npm OIDC): release-please on main. Merging the release PR runs pin guard → npm publish. No manual publish any more.
  • preview.yml: publishes any branch as X.Y.Z-preview.<run> to GitHub Packages. With native versions as inputs it first pushes preview/<ios-...>__<android-...> (e.g. preview/ios-scg-7.3.1-rc.1645__android-loans-5.5.0-rc-debug.2). Inputs can be release or debug builds.
  • iOS from SPM: scripts/fetch-ios-sdks.sh vendors the XCFrameworks (checksum-verified) into ios/Frameworks on prepack. The podspec drops s.dependency 'SCGateway'/'SCLoans'. Loans is pinned at 7.6.0.
  • pr-checks.yml on PRs into main: ClickUp link, Conventional Commit title, pin guard, Android compile of the sample app.

Conflicting setup removed or changed

  • publish.yml workflow_dispatch (npm publish from any branch) → removed.
  • release-it, standard-version (also a runtime dependency!), the release* scripts → removed; yarn.lock pruned.
  • lint.yml / sonar-scan.yaml: prod/development → main.
  • CONTRIBUTING "Publishing to npm" → describes the new flow.

ClickUp

No task linked

Test Plan

  • scripts/fetch-ios-sdks.sh: SCGateway 7.3.0, Loans 7.6.0 (public), and an internal Loans rc; checksums OK
  • npm pack --dry-run: ships ios/Frameworks
  • Sample pod install: SCGateway/SCLoans pods removed from Podfile.lock
  • actionlint, prettier --check
  • iOS sample build. Blocked locally: the fmt pod fails on Xcode 26.6 (RN 0.79 consteval issue, not from this change)
  • Android compile (CI job)
  • After merge: run native-sdk-bump.yml and preview.yml by hand

Notes

Before merging

  • main does not exist yet. Create it from prod (ad653f2, v7.7.3), make it the default branch (repository_dispatch and the bump workflow read from the default branch), add it to the branch ruleset, and retarget this PR to main. release-please bootstrap-sha = ad653f2, manifest at 7.7.3.
  • case-ci-release-app must be able to read the four iOS SPM repos (the token is minted with owner: smallcase).

Not in this PR: dispatch senders in gw-mob-android / gw-mob-ios (one event per release, after all its builds are published; native preview builds send too); retiring development, staging, production, prod; the read:packages token for internal apps.

🤖 Generated with Claude Code

…ws, iOS from SPM)

- native-sdk-bump.yml: native release events open one pin PR per SDK into development
- release-please on staging (rc + rc-debug to GitHub Packages) and production
  (npm via publish.yml, debug to GitHub Packages, backmerge)
- preview.yml: publish any branch to GitHub Packages, optional native versions
- pin guard blocks prerelease native pins from npm
- iOS SDKs vendored from SPM releases instead of CocoaPods trunk
- PR checks, staging promotion PR, Android compile check
- drop release-it/standard-version; prod -> staging/production in lint and sonar
@github-actions github-actions Bot added the release: none SDK version bump this PR causes (release-please) label Oct 16, 2026
- release-please and npm publish on main; drop staging/production channels,
  staging promotion and backmerge
- native production releases open a pin PR into main; native staging
  releases only push a native-sdk/staging/<platform>-<sdk>/<X.Y.Z> branch
- pin guard on every PR into main
- preview can use the debug native pins
@AmalJossy
AmalJossy changed the base branch from development to main October 16, 2026 13:36
- native release events carry every SDK and variant of the release
- staging -> prerelease/<platform>-<sdk>-<version>[_...], native preview ->
  preview/<platform>-..., production -> one PR per platform into main
- manual Preview with native versions pushes preview/<ios-...>__<android-...>
- apply-native-pins.sh --debug writes native-sdk-debug.json
@AmalJossy
AmalJossy marked this pull request as ready for review October 19, 2026 08:04
- each event pins the release and the debug variant on separate branches
  named after their versions; production debug builds go to prerelease/
- remove native-sdk-debug.json, apply-native-pins --debug, the X.Y.Z-debug
  package and the preview debug flag
@isouravganguly

isouravganguly commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

iOS sample build fails on my Xcode setup (26.3), both default and static linkage. Working on a fix; will post it here by mid-day once confirmed locally.

Comment thread android/build.gradle
SmallcaseGatewayModule imports Gson, but SDKs from the new pipeline
no longer expose it at compile scope.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@isouravganguly

Copy link
Copy Markdown
Contributor

Fix for the iOS build: ios/** also picks up the xcframework headers, so they compile as our sources ("unsupported Swift architecture" with default linkage, "Multiple commands produce SCGateway-Swift.h" with static).

s.source_files = "ios/*.{h,m,mm,swift}"

Verified locally on 70993ef: sample app builds with default and static linkage, SCGateway and Loans frameworks embedded. Alternative: move Frameworks/ out of ios/ and keep the glob.

ios/** also matched xcframework headers under ios/Frameworks, which then
compiled as our sources and broke the build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@AmalJossy

Copy link
Copy Markdown
Contributor Author

Done in 0338ed1: podspec source_files is now ios/*.{h,m,mm,swift}.

@AmalJossy
AmalJossy merged commit f7d2317 into main Oct 27, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: none SDK version bump this PR causes (release-please)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants