fix: Generated hook dividers #306
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: Publish Main' | |
on: "push" | |
jobs: | |
publish: | |
name: Install and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: 'Check secrets' | |
id: check-secrets | |
run: echo "has-secrets=$([ -n "${{ env.EXPO_ACCESS_TOKEN }}" ] && echo true || echo false)" >> $GITHUB_OUTPUT | |
env: | |
EXPO_ACCESS_TOKEN: ${{ secrets.EXPO_ACCESS_TOKEN }} | |
- name: 'Warn required secrets' | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'false' }} | |
run: echo 'EXPO_ACCESS_TOKEN missing in Github secrets. Skipping Expo deployment with EAS update.' | |
- name: Setup Node | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- name: Setup Expo | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
uses: expo/expo-github-action@v7 | |
with: | |
expo-version: latest | |
eas-version: latest | |
expo-cache: true | |
packager: yarn | |
token: ${{ secrets.EXPO_ACCESS_TOKEN }} | |
- name: Find yarn cache | |
id: yarn-cache-path | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore cache | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
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: Install Node.js dependencies | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
run: yarn install --immutable | |
- name: Deploy with EAS update | |
if: ${{ steps.check-secrets.outputs.has-secrets == 'true' }} | |
run: cd apps/expo && eas update --auto | |
env: | |
ENV: staging | |
BACKEND_URL: ${{ secrets.BACKEND_URL }} | |
NEXT_PUBLIC_APP_LINKS: ${{ secrets.NEXT_PUBLIC_APP_LINKS }} |