Continuous integration is the practice of frequently committing small changes to a shared repository. This can range from once per day to multiple times per day.
Continuous deployment/delivery picks up after continuous integration. CD automates the delivery of applications to selected infrastructures (like Play Store and App Store in our case). Most teams work with multiple environments other than the production, such as development and testing environments, and CD ensures there is an automated way to push code changes to them.
One of the Main Advantages of using React Native is that you can build one app that works on both ios and android platforms, same thing for CI/CD we can setup App Center for automatic builds and also ensuring smooth delivery to the App Store/Play Store. For CI we will use the same GIT Workflow, and we will create two main branches, a Develop and release branches, each time you add a new feature or you fix a bug it should be tested on dev branch and each time you want to release a new version you can do it using the release branch. If this version is stable of course you can make a PR to master so you can save the stable version on the master.
** You don't need to follow the same workflow, it depends on your needs.
After Building the app you always use App Center to publish it on the App Store or Play store.
AppCenter lets us continuously build, test, release, and monitor apps for every platform, we will use it to automate the build and release our app, to do that we need to follow a workflow in order to get everything works as it should.
From the branches list, click on the config icon to configure the build for the targeted branch, the build configuration screen will have the following options:
KEY_PASSWORDfrom To store env variables More infos
keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
You can add up to three custom build steps that run at pre-defined stages during build time, these are Bash scripts which can be executed throughout the lifecycle of the entire build, all you have to do is create any of these files inside the root of your project directory (same level as your package.json file):
You can use pre-defined, custom, or in-script environment variables to help write your Build scripts, for more info.
You can also Distribute your app directly to stores from App Center, by connecting it with Apple App Store and Google Play Store: