Skip to content

Commit

Permalink
create separate expo flows for production and preview
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminWatts committed Dec 20, 2023
1 parent 315a005 commit c7fd0e9
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: update
name: expo_preview
on:
push:
branches:
- production
- preview
workflow_run:
workflows: ["test"]
Expand Down Expand Up @@ -41,3 +40,6 @@ jobs:

- name: Publish update
run: eas update --auto

- name: Build
run: eas build --platform all -e preview
45 changes: 45 additions & 0 deletions .github/workflows/expo_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: expo_production
on:
push:
branches:
- production
workflow_run:
workflows: ["test"]
types:
- completed

jobs:
update:
name: EAS Update
runs-on: ubuntu-latest
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: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 21.1.0
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Publish update
run: eas update --auto

- name: Build
run: eas build --platform all -e --auto-submit --auto-approve

0 comments on commit c7fd0e9

Please sign in to comment.