Skip to content

ci: add @clerk/expo compat gate before release publish#593

Draft
chriscanin wants to merge 2 commits intomainfrom
chris/expo-compat-gate
Draft

ci: add @clerk/expo compat gate before release publish#593
chriscanin wants to merge 2 commits intomainfrom
chris/expo-compat-gate

Conversation

@chriscanin
Copy link
Copy Markdown
Member

Description

Adds an expo-compat job to manual-release.yml that runs before publish as a release gate. The job validates that the clerk-android version about to be published does not break @clerk/expo's native component integration.

What it does

  1. Publishes the current clerk-android source tree to mavenLocal with a snapshot suffix (e.g. 1.0.12-expo-compat-12345678)
  2. Clones clerk/javascript and clerk/clerk-expo-quickstart as siblings
  3. Patches packages/expo/android/build.gradle in the javascript checkout to use the snapshot versions and adds mavenLocal() to the repositories closure
  4. Builds the NativeComponentQuickstart app from the quickstart repo
  5. Runs the Maestro e2e suite from integration-mobile/flows/ against the running emulator
  6. If any Maestro flow fails, the publish job is blocked

Why this matters

@clerk/expo pins specific clerk-android versions in its build.gradle. When clerk-android ships a new release, that pinned version gets bumped downstream. Before this gate, there was no automated way to know if a breaking change in clerk-android would show up as a user-visible regression in @clerk/expo components — it would ship, users would file bugs, we'd find out after the fact.

With this gate, a breaking change surfaces on the PR/release that introduces it, before the SDK is published to Maven Central.

Secrets required

The following secrets must be configured on this repo's Actions settings before this workflow can succeed:

  • CLERK_TEST_EMAIL — a test user email on the Clerk dev instance (use the +clerk_test testmode pattern)
  • CLERK_TEST_PASSWORD — password for that user
  • EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY — the dev instance publishable key

Related

Phase 2 (follow-up, not in this PR)

After publish succeeds, we could auto-open a version-bump PR in clerk/javascript that updates the pinned clerkAndroidApiVersion / clerkAndroidUiVersion in packages/expo/android/build.gradle. That would eliminate the manual step of "remember to bump @clerk/expo to use the new clerk-android release."

Requires a cross-repo PAT/GitHub App token with write access to clerk/javascript. Needs discussion before implementation.

Known caveats

  • Adds ~15-20 min to every release run (emulator boot + build + Maestro)
  • Depends on clerk/clerk-expo-quickstart's main being buildable; if it breaks, this gate fails even when the clerk-android change is fine. Consider pinning QUICKSTART_REPO_REF to a specific SHA for stability.
  • OAuth flows in the Maestro suite are excluded (tag manual) because they need human OAuth interaction

Checklist

  • Configure required secrets in repo Actions settings
  • Validate the workflow on a dry-run release before merging
  • Discuss phase 2 (auto-bump PR) with the Expo/JS team

Introduces an `expo-compat` job in the manual-release workflow that
runs before `publish`. The job:

1. Publishes the current SDK source to mavenLocal with a snapshot suffix
2. Clones clerk/javascript and clerk/clerk-expo-quickstart
3. Patches @clerk/expo's pinned clerk-android version to the snapshot
4. Adds mavenLocal() to the gradle repositories so resolution works
5. Builds the quickstart NativeComponentQuickstart against the snapshot
6. Runs the Maestro e2e suite from clerk/javascript's integration-mobile/

The `publish` job now depends on `expo-compat` succeeding, so a
release cannot publish if the Expo integration tests fail.

Secrets required (to be configured on this repo):
- CLERK_TEST_EMAIL
- CLERK_TEST_PASSWORD
- EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY

Related: clerk/javascript#8334 (adds the
integration-mobile/ test suite this workflow invokes)
chriscanin added a commit to clerk/clerk-ios that referenced this pull request Apr 16, 2026
Introduces an `expo-compat` job in release-sdk.yml that runs between
`checks` and `publish`. The job validates that the clerk-ios SHA about
to be published does not break @clerk/expo's native component integration.

The job:

1. Clones clerk/javascript and clerk/clerk-expo-quickstart
2. Patches packages/expo/app.plugin.js to pin the SPM clerk-ios dependency
   to the current release SHA using requirement kind 'revision' instead
   of 'exactVersion'
3. Builds the NativeComponentQuickstart app via `expo run:ios --configuration Release`
4. Runs the Maestro e2e suite from integration-mobile/ on an iOS simulator
5. If any Maestro flow fails, the `publish` job is blocked

Because the clerk-ios dependency is resolved via SPM, no local publish
step is needed — SPM clones the clerk-ios repo at the specified SHA
during the quickstart's Xcode build.

Secrets required:
- CLERK_TEST_EMAIL
- CLERK_TEST_PASSWORD
- EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY

Related:
- clerk/javascript#8334 — adds the integration-mobile/ test suite
- clerk/clerk-android#593 — Android equivalent of this gate
Adds two workflow_dispatch inputs:
- skip_expo_compat (boolean, default false)
- skip_reason (string, required when skip=true)

When invoked with skip_expo_compat=true, the expo-compat job is skipped
and a new log-skip job records the actor, reason, and version to the
GitHub Actions job summary for permanent audit trail.

Automated release events (release: types: [published]) cannot provide
workflow_dispatch inputs, so the gate is always enforced for those
triggers. The skip is available only for manual workflow_dispatch runs,
which are already gated by the authorize job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant