Merge branch 'main' into dev #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Expo Staging | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
concurrency: | |
group: staging-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
staging: | |
name: Deploy Staging | |
runs-on: ubuntu-latest | |
env: | |
PLATFORM: ${{ secrets.PLATFORM }} | |
steps: | |
- name: Check for EXPO_TOKEN | |
run: | | |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | |
echo "EXPO_TOKEN is not set" | |
exit 1 | |
fi | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Find yarn cache | |
id: yarn-cache-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
- name: EAS Pre-Install | |
run: | | |
echo "${{ secrets.GOOGLE_SERVICES_ANDROID }}" | base64 --decode > ./src/libs/firebase/google-services.json | |
echo "${{ secrets.GOOGLE_SERVICES_IOS }}" | base64 --decode > ./src/libs/firebase/GoogleService-Info.plist | |
echo "${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}" | base64 --decode > ./src/libs/firebase/service-account-key.json | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Setup Expo | |
uses: expo/expo-github-action@v7 | |
with: | |
expo-version: latest | |
eas-version: latest | |
eas-cache: true | |
expo-cache: true | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Build on EAS | |
run: eas build --profile preview --platform ${PLATFORM} --non-interactive --no-wait |