From f2c0425953530d2bbbe29c8ba520e49cc09aa1b7 Mon Sep 17 00:00:00 2001 From: Ayan Das Date: Sun, 1 Dec 2024 12:53:55 -0500 Subject: [PATCH] Update update.yml --- .github/workflows/update.yml | 56 +++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 7156334..3e187fa 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -3,34 +3,36 @@ on: push 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: EAS Update + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 - - name: Checkout Repository - uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: yarn - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version : 18.x - cache: yarn + - name: expo Login + uses: expo login -u dasa60196@gmail.com -p ZWz9glhg1Hj0o9yRhO7HBC3gkKLLIRiQ59dLCxo2aURTux92py + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: n5mAjBGWGe3H20wx9Vcp7AN20L1U80WIDVes0Aao - - name: Setup EAS - uses: expo/expo-github-actions@v8 - with: - eas-version: latest - token: ${{ secrets.EXPO_TOKEN }} + - name: Install dependencies + run: yarn install - - name: Install Dependancies - run: yarn Install - - - name: Publish Update - run: eas update --auto - \ No newline at end of file + - name: 🚀 Create preview + uses: expo/expo-github-action/preview@v8 + with: + # `github.event.pull_request.head.ref` is only available on `pull_request` triggers. + # Use your own, or keep the automatically inferred branch name from `--auto`, when using different triggers. + command: eas update --auto --branch ${{ github.event.pull_request.head.ref }} +