Beginner’s Guide to CI/CD with Fastlane, GitHub, and React Native 0.81.4

Beginner’s Guide to CI/CD with Fastlane, GitHub, and React Native 0.81.4

Hey folks 👋,

If you’re diving into React Native CLI 0.81.4 and wondering how to get those smooth automated builds for Android & iOS, then let’s talk about setting up CI/CD with Fastlane + GitHub Actions. Trust me—this will save you from late-night manual builds and release chaos.

This is a simple, beginner-friendly guide—straight from my hands-on dev notes.


Why CI/CD in React Native?

  • No more manual repetitive builds.
  • Faster release cycles with fewer human errors.
  • Easy collaboration—your whole team can ship confidently.
  • Automated checks to catch bugs early.


What You’ll Need

  • React Native CLI 0.81.4 project
  • Node.js & Yarn
  • Android Studio + Xcode for local builds
  • GitHub repo to host your code
  • Fastlane for automation


🛠 Step 1: Setup Your Project

npx react-native init MyApp --version 0.81.4
cd MyApp
git init
git remote add origin https://github.com/your-username/MyApp.git
git push -u origin main
        

Step 2: Fastlane Installation

Inside iOS and Android folders:

iOS

cd ios
bundle init
bundle add fastlane
bundle exec fastlane init
        

Android

cd android
bundle init
bundle add fastlane
bundle exec fastlane init
        

This will generate a Fastfile where you define your automation.


Step 3: Add Fastlane Lanes

Here’s a starter Fastfile:

platform :ios do
  desc "Build iOS app"
  lane :build do
    build_app(scheme: "MyApp")
  end
end

platform :android do
  desc "Build Android app"
  lane :build do
    gradle(task: "assembleRelease")
  end
end
        

Step 4: Setup GitHub Actions

Create: .github/workflows/ci.yml

name: React Native CI/CD

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: macos-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install Dependencies
        run: yarn install

      - name: iOS Build
        run: |
          cd ios
          bundle exec fastlane build

      - name: Android Build
        run: |
          cd android
          bundle exec fastlane build
        

Testing & Deployment

  • Add test jobs before building.
  • Hook up Fastlane with App Store Connect & Google Play.
  • Store your signing keys, secrets, and API tokens in GitHub Actions Secrets.


Quick Takeaways

  • React Native 0.81.4 + Fastlane = smooth automation.
  • GitHub Actions is free, reliable, and flexible.
  • Start small → Build only. Then grow → Test + Deploy.


References & Useful Reads


Pro Tip: Split your workflows—one for PR validation, one for nightly builds, and one for production. Cleaner pipelines, happier devs.

Next time, I’ll show how to auto-deploy to App Store & Play Store (yes, real publishing magic).

To view or add a comment, sign in

More articles by DhineshKumar Thirupathi

Explore content categories