Skip to content

Added frontend auth changes #45

Added frontend auth changes

Added frontend auth changes #45

Workflow file for this run

name: Build and submit apps through Expo EAS
on:
pull_request:
types:
- closed
paths:
- 'mobile/**'
branches:
- main
jobs:
run-script:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
- name: Check for GOOGLE_SERVICE_ACCOUNT_JSON
run: |
if [ -z "${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}" ]; then
echo "You must provide a GOOGLE_SERVICE_ACCOUNT_JSON secret in this repo's secrets. It must be stored as a Base64 encoded string."
exit 1
fi
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
cache-dependency-path: mobile/package-lock.json
- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: |
cd mobile
npm install --legacy-peer-deps
- name: Write Google service account file
run: |
echo "${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}" | base64 --decode > ./mobile/google-service-account.json
if [ ! -f "./mobile/google-service-account.json" ]; then
echo "Failed to create the google-service-account.json file"
exit 1
fi
if [ ! -s "./mobile/google-service-account.json" ]; then
echo "The google-service-account.json file is empty"
exit 1
fi
- name: Run script
run: |
cd mobile
npm run create-stores-build