Publish your first release
Publish your first release
This is the last step in Setup; it confirms your server, CLI, app, and SDK are wired correctly. After this, see Using Patch for ongoing release workflows.
From your React Native project root, create the CLI context once:
cmpatch init \
--server-url https://updates.example.com \
--ios-app MyApp-iOS \
--android-app MyApp-Android \
--deployment Staging \
--yes
This writes codemagic-patch.config.json so later commands can omit --server-url/--app. Inspect the resolved context:
cmpatch context
cmpatch context --remote # also shows server-provided SDK download base URL
Dry-run, then publish:
# Preview without uploading
cmpatch release-react --platform ios --deployment Staging --dry-run
cmpatch release-react --platform android --deployment Staging --dry-run
# Publish
cmpatch release-react --platform ios --deployment Staging --release-notes "Fix onboarding crash" --yes
cmpatch release-react --platform android --deployment Staging --release-notes "Fix onboarding crash" --yes
release-react analyzes the project, auto-detects the bundler (Metro or Expo), resolves the target binary version, builds the bundle, and uploads it. If auto-detection can't determine a value, pass it explicitly:
cmpatch release-react \
--platform ios \
--deployment Staging \
--target-binary-version 1.2.3 \
--bundler metro \
--entry-file index.js \
--yes
Watch processing complete:
cmpatch release list --app MyApp-iOS --deployment Staging --format table
cmpatch release inspect --app MyApp-iOS --deployment Staging --label v1 --wait
cmpatch bundle --platform ios builds a .cmpatch artifact without uploading, useful for inspecting or publishing later via cmpatch release create --bundle-path file.cmpatch. When the app requires code signing, pass --private-key-path to cmpatch bundle as well.
Next steps
- Verify a test release: confirm the app on device receives your OTA
- Releasing updates: Staging → Production workflow
- Production control: rollouts, mandatory updates, rollbacks
- CI integration: automate in pipelines