A CLI for integrating CI/CD pipeline to React Native project. It will generate, modify necessary files and install packages to achieve this.
Historically, setting up CI/CD for React Native has been hard and by automating the most of it through react-native-ci it can become easy!
Current status: Experimental
Test first with cleanly init React Native project. Make sure you have commited your code before to avoid any data loss.
- Currently runs on MacOS
Opinionated stack:
- Github
- CircleCI
- Dev, Staging, Production build flavors
Possibility to extend supporting other choices, please contribute!
npm install -g react-native-ci
Run command in your project root:
react-native-ci init
Provide the required information when prompted. Optionally you can give input as command line parameters or define config file. This is useful when you test command multiple times and don't want to have to input all the values manually each time. Especially useful when developing and testing react-native-ci itself!
--ci
- will initialize CI integration
--android
will initialize Android integration
--ios
will initialize iOS integartion.
If none are provided, defaults to running all the ingerations.
You can also provide all the values that are configurable in the config file as command line arguments.
So --appleDevAccount [email protected]
to set your Apple dev account for example.
module.exports = {
defaults: {
githubOrg: "org-name",
repo: "github-repo",
circleApi: "circleApiToken",
googleJsonPath: "path/to/google/json",
appleDevAccount: "[email protected]",
iTunesTeamId: "itunes-team-id",
appConnectTeamId: "app-connect-team-id",
certRepoUrl: "[email protected]:company/project-ios-certs.git",
appId: "com.company.greatapp",
matchPassword: "password",
}
}
There are 8 different steps that all are automated through the tool.
- Integrate CI/CD server to version control
- Configure CI/CD server pipelines
- Add build flavors to app
- Share secrets
- Setup app signing & certificates
- Handle updating version numbering
- Icon badges for dev and staging builds
- Deployment to app stores
Here are slides from React Finland talk going through the steps.
We welcome contributions to make react-native-ci even better. If you are interested in the library, come join us at #react-native-ci on Infinite Red's Community Slack.
-
Gofore Mobile team
-
Infinite Red for Gluegun
MIT - see LICENSE