- Android
- iOS
- React Native
- Flutter
- Expo (based on React Native)
- Android Play Store
- Android Play Store (Beta)
- iOS TestFlight
- iOS App Store
Run the following command to install/update the configuration files into your project (run this command inside your project root directory):
bash <(curl -s https://raw.githubusercontent.com/ravnhq/mobile-cicd/main/install.sh)
The script will copy the configuration files over the root directory of your project, checking if any of them already
exist and asking for your confirmation before replacing any of them. If a fastlane
directory is already present, the
script will rename it to fastlane.old
.
Prerequisite: Install Ruby latest version on your system, preferably using
rbenv
to avoid messing up the default system installation.
Note: Check other sections for configuration and then come back to this section to run locally.
To run locally use the provided wrapper fastlanew
, for example:
./fastlanew android beta
./fastlanew android beta
./fastlanew android release
./fastlanew ios beta
./fastlanew ios release
Configuration files in this repository may update from time to time to support new use cases and functionality, one way
to keep up-to-date is to let fastlanew
check for updates automatically whenever any command is run or to check for
them explicitly with ./fastlanew self-update
.
Authentication to Apple services is done using an App Store Connect API key, check the environment variables that need to be set under the .env.example and follow this link to learn how to create a key.
Follow this link on how to get JSON key with Google Credentials to access Google APIs.
Configuration is managed using environment variables. You can find a list of these variables along with their
descriptions in the .env.example file. With fastlane, you can use the --env
flag to switch between
different environments by loading different dotenv
files (see more here)
fastlane --env development # loads .env.development
fastlane --env release # loads .env.release
Run fastlane match init
to set up match based on your organization and project needs. For more information on the
setup of match visit this link.
Version code can be set automatically by this pipeline using the version.code
property, to use it in your Android
project do the following:
- Set the initial value in your
gradle.properties
file (optional)version.code=1
- Read and use property in your
build.gradle
file:or with Gradle KTS (versionCode property('version.code').toInteger()
build.gradle.kts
):versionCode = property("version.code").toString().toInt()
- That's it, all your Android builds will use the value from the
gradle.properties
that's automatically updated by this pipeline.
Expo (or adopted Prebuild)
Note: Only app configurations written in JSON are supported at the moment (i.e.
app.json
)
Prerequisite: Run
npx expo prebuild
to generate an initialapp.json
file or write one from scratch.
Inside your app.json
file make sure that the values for expo.ios.bundleIdentifier
and expo.android.package
are not
empty, and they match the values for the environment variables FL_APP_IDENTIFIER
and FL_PACKAGE_NAME
respectively.
Prerequisite: Run
npx expo prebuild
to generate an initialapp.json
file or write one from scratch.
Inside your app.json
file write the initial values for expo.android.versionCode
and expo.ios.buildNumber
, if not found by default starts with 1. Other versioning rules from environment variables
still apply (for example, FL_BUILD_NUMBER=store
and FL_COMMIT_INCREMENT=true
)
- fastlane-android-action: Action to build and publish Android applications.
- fastlane-ios-action: Action to build and publish iOS applications.