Coder Social home page Coder Social logo

victorbruce / rn-production Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 565 KB

Code for blog article "Preparing a react native app for production" Series

JavaScript 11.28% Starlark 4.09% Java 42.26% Ruby 6.80% Objective-C 31.16% Shell 4.41%
fastlane firebase firebaseappdistribution gpg-encryption reactnative githubactions

rn-production's Introduction

About

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:

  1. Preparing Your React Native App for Production(Android) — Part 1
  2. Publish your Production-ready React Native Application to Firebase App Distribution(Android) — Part 2
  3. Publish a Production-ready React Native App To Firebase App Distribution Using Fastlane. — Part 3
  4. Build a CI/CD pipeline using Fastlane, Github Actions, and Firebase App Distribution

Branches:

  • 🗂 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

How to run the App

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.

Screenshot




How To Contribute

  • Submit an issue on the repo

License

  • MIT

rn-production's People

Contributors

victorbruce avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

aj-walker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.