A project based on a blog series on how to prepare a react-native app for production, automate the buid process using fastlane and build a CI/CD pipeline using Github Actions with fastlane to deploy code automatically based on a Github Event Type.
Below are links to the blog articles on medium:
- Preparing Your React Native App for Production(Android) — Part 1
- Publish your Production-ready React Native Application to Firebase App Distribution(Android) — Part 2
- Publish a Production-ready React Native App To Firebase App Distribution Using Fastlane. — Part 3
- Build a CI/CD pipeline using Fastlane, Github Actions, and Firebase App Distribution
-
🗂 master:
- holds the latest changes
-
🗂 v1.0.0:
- Built a production ready react-native app with a signed APK ready to be published to Firebase App Distribution
-
🗂 firebase-console-release:
- Register the app with Firebase
- Upload signed APK to Firebase App Distribution
-
🗂 fastlane
- Install and setup fastlane
- Define an android lane to build and distribute app
- Install Firebase App Distribution plugin
- Authenticate with Firebase
- Run the command to build and distribute app with fastlane
-
🗂 ci-cd
- Setup Github Actions and define a CD workflfow file using YAML syntax.
- Add a lane in FastFile to bump android and ios version numbers using Js version number as the source of truth
- Add a script run bump javascript, android, and ios version numbers(patch/minor/major)
- Encrypt keys and keystore files using gpg tool
- Add a script file to decrypt keys and keystore files when running in Github VM
- Add a job runner to the cd workflow file to tag each release with the lastest version number
Pre-requisite:
- A react-native environment setup
Install the App:
- Clone the project from Github onto your local machine
- Open the project in your IDE or text editor of your choice
- Install the npm dependencies by running
npm install
inside your terminal - cd into ios/ directory and run
pod install
Running the App:
- Inside your terminal, run the command
npx react-native start
to start the development server. - Run the command in a new terminal window
npx react-native run-ios
to install and run the app on iOS simulator. - Or run the command in a new terminal window
npx react-native run-ios
to install and run the app on an Android emulator.
- Submit an issue on the repo
- MIT