Mobile App CI / CD pipeline using Fastlane and Github Actions
DevOps
Project details
Description
This project demonstrates the deployment of a React Native app using Fastlane and
Github Actions. Fastlane is used to automate the build and code signing, and Github Actions is the
CI / CD platform used to automate the building, testing and deployment of the pipelines.
Mobile App CI/CD (Continuous Integration and Continuous Delivery) is the practice of
automating the building, testing and deployment of mobile applications. In Continuous
Integration, code is gradually pushed into a feature branch where it is reviewed, tested and confirmed
that there are no bugs or quality concerns.This makes it easier to identify and fix bugs before it
is deployed.After the CI checks are all passed,Continuous Delivery takes over by further testing the
code before it is deployed to production.In the Continuous Delivery process, the Android and iOS app
is built,versioned,code signed and deployed to the app store awaiting approval.
Challenges
Achieving faster iteration, better quality assurance and easier deployment is done
thanks to CD/CD, but mobile CI/CD has its own unique challenges, some of which are:
- Setting up the CI/CD pipeline
- Platform specific setups
- Dependency Management
- Code signing
- Handling environment variables securely
- Running automated tests
- Deployment to app stores
Steps Taken
To successfully set up a CI/CD pipeline for a React Native project, you should do
the following:
- Selecting the CI/CD platform: There are several CI/CD platforms available, for the purposes of this project Github Actions and Fastlane will be used.
- Selecting the branching strategy: This project has two separate environments for its application, the staging environment and the production environment, and the best branching strategy that fits our scenario is the git flow.
- Selecting the version strategy: Because this is a mobile application, the semantic versioning strategy is used, where each patch is incremented as bugs are fixed, minor features are merged, and major app releases are made when old versions become obsolete.
- SafeCode signing the Android and iOS app: Each application should be signed according to its platform-specific requirements prior to deployment.