From 7eac4ca45509be860a01fee139ddccfb015dff62 Mon Sep 17 00:00:00 2001 From: Mohamad Mortada Date: Sun, 19 Jan 2025 17:42:18 -0800 Subject: [PATCH] Create Expo Preview Workflow (#142) Create preview.yml --- .github/workflows/preview.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..760e494 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,39 @@ +name: preview +on: pull_request + +jobs: + update: + name: EAS Update + runs-on: ubuntu-latest + permissions: + contents: read + 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: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: Install dependencies + run: bun install + + - name: 🚀 Create preview + uses: expo/expo-github-action/preview@v8 + with: + command: eas update --auto --branch preview