Skip to content

ci: add deploy github action for android #67

ci: add deploy github action for android

ci: add deploy github action for android #67

Workflow file for this run

name: 🚀 Deploy
on:
push:
branches:
- main
env:
APP_VARIANT: internal
CI: true
jobs:
build:
name: Build & Deploy ${{ matrix.platform }}
strategy:
matrix:
include:
- platform: android
os: ubuntu-latest
# - platform: ios
# os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
- name: iOS Encrypt GPG secure files
if: ${{ matrix.platform == 'ios' }}
run: |
brew install [email protected]
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 google-services.json.gpg
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 deploy/ios/AuthKey_3Q9U495BMY.p8.gpg
- name: Android Encrypt GPG secure files
if: ${{ matrix.platform == 'android' }}
run: |
sudo apt-get install -y gnupg1
echo ${{ secrets.SUPER_SECRET_PASSWORD }} | gpg1 --no-tty --passphrase-fd 0 google-services.json.gpg
- name: Build Expo app prebuild for ${{ matrix.platform }}
run: yarn expo prebuild
- name: iOS Fastlane
if: ${{ matrix.platform == 'ios' }}
run: |
fastlane ios deploy
working-directory: ${{ github.workspace }}/deploy/ios
env:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_TYPE: appstore
MATCH_FORCE: "true"
FASTLANE_TEAM_ID: A4B84UJD7M
- name: Setup Ruby + Cache Gems
uses: ruby/setup-ruby@v1
if: ${{ matrix.platform == 'android' }}
with:
bundler-cache: true
working-directory: deploy/android
- name: Android Fastlane
if: ${{ matrix.platform == 'android' }}
run: |
bundle exec fastlane android internal --env internal
working-directory: ${{ github.workspace }}/deploy/android
env:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}