Skip to main content

Release build

Workflow that build the app in release mode for Android and iOS.

This workflow can be triggered by other workflows depending on it.

Usage

This workflow cannot be explicitly specified to be generated using SCI. It will be generated automatically if you choose to create workflow depending on it.

Detailed behavior

Below you can find detailed information about what the script does with your project when generating Release Build workflow.

Caching

Built apps will be cached using actions/cache using keys android-release-build-${{ github.event.pull_request.head.sha }} and ios-release-build-${{ github.event.pull_request.head.sha }}.

${{ github.event.pull_request.head.sha }} will evaluate to SHA of last commit on feature branch in Pull Request.

Note that the objective of this caching mechanism is not to optimize and reuse builds (this is only possible with debug builds), but rather to allow retrieving built app in other workflows.

Modified and created files

FileChanges
.github/workflows/build-release-android.ymlContains the CI workflow for building release Android app
.github/workflows/build-release-ios.ymlContains the CI workflow for building release iOS app
package.json
  • New script:build:release:android: npx expo prebuild && cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -Dorg.gradle.jvmargs=-Xmx4g
    (npx expo prebuild is ommited in non-Expo projects)
  • New script:build:release:ios: npx expo prebuild && xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/[iOSAppName].xcworkspace -UseNewBuildSystem=YES -scheme [iOSAppName] -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -quiet
    (npx expo prebuild is replaced with cd ios && pod install && cd.. in non-Expo projects)
    ([iOSAppName] is replaced with the name of the iOS app retrieved from native code)
app.jsonFields expo.android.package and expo.ios.bundleIdentifier will be created in Expo projects if not detected (they are needed for npx expo prebuild)

Workflow details

build-release-android

The following diagram represents the flow of the build-release-android workflow:

build-release-ios

The following diagram represents the flow of the build-release-ios workflow: