From 9e71c3d0544e43aa68a48792cdea5845cd3419e2 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Tue, 13 May 2025 23:50:40 +0100 Subject: [PATCH 01/12] build: implement actions for mobile CI/CD --- .github/workflows/build-and-submit-prod.yml | 27 +++++++++++++ .github/workflows/ota-publish.yml | 23 +++++++++++ .github/workflows/preview-android-feature.yml | 38 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 .github/workflows/build-and-submit-prod.yml create mode 100644 .github/workflows/ota-publish.yml create mode 100644 .github/workflows/preview-android-feature.yml diff --git a/.github/workflows/build-and-submit-prod.yml b/.github/workflows/build-and-submit-prod.yml new file mode 100644 index 0000000..0f132e0 --- /dev/null +++ b/.github/workflows/build-and-submit-prod.yml @@ -0,0 +1,27 @@ +name: Build & Submit Production + +on: + pull_request: + branches: [main] + paths-ignore: ["docs/**"] + types: [opened, synchronize] + # Only run if PR is from `dev` branch + if: github.head_ref == 'dev' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: npm install -g eas-cli + - run: eas login --token ${{ secrets.EAS_TOKEN }} + + - run: eas build --platform android --profile production --non-interactive --no-wait + - run: eas build --platform ios --profile production --non-interactive --no-wait + + - run: eas submit --platform android --profile production --non-interactive + - run: eas submit --platform ios --profile production --non-interactive diff --git a/.github/workflows/ota-publish.yml b/.github/workflows/ota-publish.yml new file mode 100644 index 0000000..ea3bc78 --- /dev/null +++ b/.github/workflows/ota-publish.yml @@ -0,0 +1,23 @@ +name: OTA Publish to Production + +on: + pull_request: + branches: [main] + types: [opened, synchronize] + # Only if PR is from `ota/*` + if: startsWith(github.head_ref, 'ota/') + +jobs: + publish-ota: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: npm install -g eas-cli + - run: eas login --token ${{ secrets.EAS_TOKEN }} + + - run: eas update --channel production --platform android --non-interactive diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml new file mode 100644 index 0000000..26cb4af --- /dev/null +++ b/.github/workflows/preview-android-feature.yml @@ -0,0 +1,38 @@ +name: Preview Android Build (Feature Branch) + +on: + pull_request: + types: [opened, synchronize] + branches-ignore: [] + paths-ignore: ["docs/**"] + +jobs: + preview-android: + if: startsWith(github.head_ref, 'feature/') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: npm install -g eas-cli + - run: eas login --token ${{ secrets.EAS_TOKEN }} + + - name: Trigger EAS Android build (preview) + id: eas_build + run: | + eas build --platform android --profile preview --non-interactive --json > build.json + BUILD_URL=$(cat build.json | jq -r '.[0].artifacts.buildUrl') + echo "BUILD_URL=$BUILD_URL" >> $GITHUB_ENV + + - name: Post PR comment with preview link + if: github.event_name == 'pull_request' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + BUILD_URL: ${{ env.BUILD_URL }} \ No newline at end of file From 2dfef3a40e80410e1c5f9f50230cf113c0ad0b2e Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Tue, 13 May 2025 23:50:57 +0100 Subject: [PATCH 02/12] build: setup profile for EAS --- eas.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/eas.json b/eas.json index a27779f..68fc01c 100644 --- a/eas.json +++ b/eas.json @@ -10,6 +10,41 @@ "resourceClass": "m-medium" }, "channel": "development" + }, + "preview": { + "distribution": "internal", + "channel": "staging", + "ios": { + "resourceClass": "m-medium" + } + }, + "production": { + "channel": "production", + "ios": { + "resourceClass": "m-medium" + } + } + }, + "submit": { + "preview": { + "ios": { + "appleId": "infinitymichael7@gmail.com", + "ascAppId": "", + "appleTeamId": "" + }, + "android": { + "track": "internal" + } + }, + "production": { + "ios": { + "appleId": "infinitymichael7@gmail.com", + "ascAppId": "", + "appleTeamId": "" + }, + "android": { + "track": "production" + } } } } \ No newline at end of file From f1b2c982679e26e001d7011b0b4b2fe595177a3f Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Tue, 13 May 2025 23:53:01 +0100 Subject: [PATCH 03/12] chore: commented out OTA updated --- .github/workflows/ota-publish.yml | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ota-publish.yml b/.github/workflows/ota-publish.yml index ea3bc78..7f91603 100644 --- a/.github/workflows/ota-publish.yml +++ b/.github/workflows/ota-publish.yml @@ -1,23 +1,23 @@ -name: OTA Publish to Production +# name: OTA Publish to Production -on: - pull_request: - branches: [main] - types: [opened, synchronize] - # Only if PR is from `ota/*` - if: startsWith(github.head_ref, 'ota/') +# on: +# pull_request: +# branches: [main] +# types: [opened, synchronize] +# # Only if PR is from `ota/*` +# if: startsWith(github.head_ref, 'ota/') -jobs: - publish-ota: - runs-on: ubuntu-latest +# jobs: +# publish-ota: +# runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: 18 - - run: npm install -g eas-cli - - run: eas login --token ${{ secrets.EAS_TOKEN }} +# - run: npm install -g eas-cli +# - run: eas login --token ${{ secrets.EAS_TOKEN }} - - run: eas update --channel production --platform android --non-interactive +# - run: eas update --channel production --platform android --non-interactive From 27f8ae6076df6d35cb66881258040fc092d1ae29 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Tue, 13 May 2025 23:57:56 +0100 Subject: [PATCH 04/12] build: updated prod yml and fixed eas auth issue on preview build --- .github/workflows/build-and-submit-prod.yml | 44 +++++++++---------- .github/workflows/preview-android-feature.yml | 18 +++++--- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-and-submit-prod.yml b/.github/workflows/build-and-submit-prod.yml index 0f132e0..616680d 100644 --- a/.github/workflows/build-and-submit-prod.yml +++ b/.github/workflows/build-and-submit-prod.yml @@ -1,27 +1,27 @@ -name: Build & Submit Production +# name: Build & Submit Production -on: - pull_request: - branches: [main] - paths-ignore: ["docs/**"] - types: [opened, synchronize] - # Only run if PR is from `dev` branch - if: github.head_ref == 'dev' +# on: +# pull_request: +# branches: [main] +# paths-ignore: ["docs/**"] +# types: [opened, synchronize] +# # Only run if PR is from `dev` branch +# if: github.head_ref == 'dev' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# - uses: actions/setup-node@v3 +# with: +# node-version: 18 - - run: npm install -g eas-cli - - run: eas login --token ${{ secrets.EAS_TOKEN }} +# - run: npm install -g eas-cli +# - run: eas login --token ${{ secrets.EAS_TOKEN }} - - run: eas build --platform android --profile production --non-interactive --no-wait - - run: eas build --platform ios --profile production --non-interactive --no-wait +# - run: eas build --platform android --profile production --non-interactive --no-wait +# - run: eas build --platform ios --profile production --non-interactive --no-wait - - run: eas submit --platform android --profile production --non-interactive - - run: eas submit --platform ios --profile production --non-interactive +# - run: eas submit --platform android --profile production --non-interactive +# - run: eas submit --platform ios --profile production --non-interactive diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index 26cb4af..e0c67ad 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -3,12 +3,12 @@ name: Preview Android Build (Feature Branch) on: pull_request: types: [opened, synchronize] - branches-ignore: [] - paths-ignore: ["docs/**"] + branches: [main] + # paths-ignore: ["docs/**"] jobs: preview-android: - if: startsWith(github.head_ref, 'feature/') + # if: startsWith(github.head_ref, 'feature/') runs-on: ubuntu-latest steps: @@ -16,9 +16,17 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 + cache: yarn + + - name: 🏗 Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EAS_TOKEN }} + + - name: 📦 Install dependencies + run: yarn install - - run: npm install -g eas-cli - - run: eas login --token ${{ secrets.EAS_TOKEN }} - name: Trigger EAS Android build (preview) id: eas_build From c082e20f235174a31c3c4571489c57ec019cfab7 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:00:15 +0100 Subject: [PATCH 05/12] build: fixed preview CI build job --- .github/workflows/preview-android-feature.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index e0c67ad..cc6d6c8 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -2,13 +2,13 @@ name: Preview Android Build (Feature Branch) on: pull_request: - types: [opened, synchronize] branches: [main] - # paths-ignore: ["docs/**"] - + paths-ignore: ["docs/**"] + types: [opened, synchronize] + # Only run if PR is from `dev` branch + if: github.head_ref == 'dev' jobs: preview-android: - # if: startsWith(github.head_ref, 'feature/') runs-on: ubuntu-latest steps: @@ -16,13 +16,14 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: yarn + cache: yarn + - name: 🏗 Setup EAS uses: expo/expo-github-action@v8 with: eas-version: latest - token: ${{ secrets.EAS_TOKEN }} + token: ${{ secrets.EXPO_TOKEN }} - name: 📦 Install dependencies run: yarn install From e872e7a5946f538e8dce6b718d2172100997fcc1 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:01:44 +0100 Subject: [PATCH 06/12] build: modified scripts --- .github/workflows/preview-android-feature.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index cc6d6c8..dcee8d8 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -3,14 +3,10 @@ name: Preview Android Build (Feature Branch) on: pull_request: branches: [main] - paths-ignore: ["docs/**"] - types: [opened, synchronize] - # Only run if PR is from `dev` branch - if: github.head_ref == 'dev' + jobs: - preview-android: + build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 From bc0a1484ec88c89b1bb69e89f5d25dd3e1396528 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:02:41 +0100 Subject: [PATCH 07/12] build: added test for new push --- .github/workflows/preview-android-feature.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index dcee8d8..216b19f 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -1,6 +1,9 @@ name: Preview Android Build (Feature Branch) on: + push: + branches: + - "**" pull_request: branches: [main] From 8f1729673e367c58661f28e4b0d1a8e77853be2a Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:06:16 +0100 Subject: [PATCH 08/12] fix: fixed jobs formatting. --- .github/workflows/preview-android-feature.yml | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index 216b19f..8d57342 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -1,22 +1,28 @@ name: Preview Android Build (Feature Branch) on: - push: - branches: - - "**" pull_request: branches: [main] + paths-ignore: + - "**.md" + - "docs/**" + types: [opened, synchronize, reopened] jobs: build: + name: Build Android Preview + # Only run this workflow for feature branches + if: startsWith(github.head_ref, 'feature/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 with: node-version: 18 - cache: yarn - + cache: yarn - name: 🏗 Setup EAS uses: expo/expo-github-action@v8 @@ -27,8 +33,7 @@ jobs: - name: 📦 Install dependencies run: yarn install - - - name: Trigger EAS Android build (preview) + - name: Trigger EAS Android build (preview) id: eas_build run: | eas build --platform android --profile preview --non-interactive --json > build.json @@ -36,11 +41,9 @@ jobs: echo "BUILD_URL=$BUILD_URL" >> $GITHUB_ENV - name: Post PR comment with preview link - if: github.event_name == 'pull_request' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" - env: PR_URL: ${{ github.event.pull_request.html_url }} - BUILD_URL: ${{ env.BUILD_URL }} \ No newline at end of file + BUILD_URL: ${{ env.BUILD_URL }} + run: | + gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" \ No newline at end of file From 7f945f7c9e2d0924f259a14d781ca165ee295a20 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:12:11 +0100 Subject: [PATCH 09/12] chore: updated env --- .github/workflows/preview-android-feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index 8d57342..bf13a33 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -28,7 +28,7 @@ jobs: uses: expo/expo-github-action@v8 with: eas-version: latest - token: ${{ secrets.EXPO_TOKEN }} + token: ${{ secrets.EAS_TOKEN }} - name: 📦 Install dependencies run: yarn install From 713ed0bf2eb8643632d77f8c35a35cd3e0c4df0e Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Wed, 14 May 2025 00:18:33 +0100 Subject: [PATCH 10/12] chore: updated eas json and eas version --- .github/workflows/preview-android-feature.yml | 6 ++--- eas.json | 22 ------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index bf13a33..73e9f56 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -24,13 +24,13 @@ jobs: node-version: 18 cache: yarn - - name: 🏗 Setup EAS + - name: Setup EAS uses: expo/expo-github-action@v8 with: - eas-version: latest + eas-version: 16.1.0 token: ${{ secrets.EAS_TOKEN }} - - name: 📦 Install dependencies + - name: Install dependencies run: yarn install - name: Trigger EAS Android build (preview) diff --git a/eas.json b/eas.json index 68fc01c..ade6983 100644 --- a/eas.json +++ b/eas.json @@ -24,27 +24,5 @@ "resourceClass": "m-medium" } } - }, - "submit": { - "preview": { - "ios": { - "appleId": "infinitymichael7@gmail.com", - "ascAppId": "", - "appleTeamId": "" - }, - "android": { - "track": "internal" - } - }, - "production": { - "ios": { - "appleId": "infinitymichael7@gmail.com", - "ascAppId": "", - "appleTeamId": "" - }, - "android": { - "track": "production" - } - } } } \ No newline at end of file From 4c390e9079355c89a69afea652d8b5ca40571556 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Thu, 15 May 2025 00:26:55 +0100 Subject: [PATCH 11/12] build: reworked yml to trigger based on branch --- .github/workflows/build-and-submit-prod.yml | 70 ++++++++++++------- .github/workflows/ota-publish.yml | 45 +++++++----- .github/workflows/preview-android-feature.yml | 12 ++-- 3 files changed, 76 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-and-submit-prod.yml b/.github/workflows/build-and-submit-prod.yml index 616680d..72bb852 100644 --- a/.github/workflows/build-and-submit-prod.yml +++ b/.github/workflows/build-and-submit-prod.yml @@ -1,27 +1,43 @@ -# name: Build & Submit Production - -# on: -# pull_request: -# branches: [main] -# paths-ignore: ["docs/**"] -# types: [opened, synchronize] -# # Only run if PR is from `dev` branch -# if: github.head_ref == 'dev' - -# jobs: -# build: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/setup-node@v3 -# with: -# node-version: 18 - -# - run: npm install -g eas-cli -# - run: eas login --token ${{ secrets.EAS_TOKEN }} - -# - run: eas build --platform android --profile production --non-interactive --no-wait -# - run: eas build --platform ios --profile production --non-interactive --no-wait - -# - run: eas submit --platform android --profile production --non-interactive -# - run: eas submit --platform ios --profile production --non-interactive +name: Build & Submit Production + +on: + pull_request: + branches: [main] # Target branch is 'main' + paths-ignore: ["docs/**"] + types: [opened, reopened] # Avoid triggering on new commits + +jobs: + build: + if: github.head_ref == 'dev' # Only run if PR is from 'dev' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: 16.1.0 + token: ${{ secrets.EAS_TOKEN }} + + - name: Install dependencies + run: yarn install + + - name: Trigger Android Production Build + run: eas build --platform android --profile production --non-interactive --no-wait + + # - name: Trigger iOS Production Build + # run: eas build --platform ios --profile production --non-interactive --no-wait + + - name: Submit Android Build to Store + run: eas submit --platform android --profile production --non-interactive + + # - name: Submit iOS Build to Store + # run: eas submit --platform ios --profile production --non-interactive diff --git a/.github/workflows/ota-publish.yml b/.github/workflows/ota-publish.yml index 7f91603..bdac2e7 100644 --- a/.github/workflows/ota-publish.yml +++ b/.github/workflows/ota-publish.yml @@ -1,23 +1,32 @@ -# name: OTA Publish to Production +name: OTA Publish to Production -# on: -# pull_request: -# branches: [main] -# types: [opened, synchronize] -# # Only if PR is from `ota/*` -# if: startsWith(github.head_ref, 'ota/') +on: + pull_request: + branches: [main] + types: [opened, reopened] +jobs: + publish-ota: + if: startsWith(github.head_ref, 'ota/') + runs-on: ubuntu-latest -# jobs: -# publish-ota: -# runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/setup-node@v3 -# with: -# node-version: 18 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn -# - run: npm install -g eas-cli -# - run: eas login --token ${{ secrets.EAS_TOKEN }} + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: 16.1.0 + token: ${{ secrets.EAS_TOKEN }} -# - run: eas update --channel production --platform android --non-interactive + - name: Install dependencies + run: yarn install + + - name: Publish OTA to Production Channel + run: eas update --channel production --platform android --non-interactive diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index 73e9f56..b788f12 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -2,18 +2,18 @@ name: Preview Android Build (Feature Branch) on: pull_request: - branches: [main] + branches: [dev] paths-ignore: - "**.md" - "docs/**" - types: [opened, synchronize, reopened] + types: [opened, reopened] jobs: build: name: Build Android Preview - # Only run this workflow for feature branches - if: startsWith(github.head_ref, 'feature/') + if: startsWith(github.head_ref, 'feature/') runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -27,7 +27,7 @@ jobs: - name: Setup EAS uses: expo/expo-github-action@v8 with: - eas-version: 16.1.0 + eas-version: latest token: ${{ secrets.EAS_TOKEN }} - name: Install dependencies @@ -46,4 +46,4 @@ jobs: PR_URL: ${{ github.event.pull_request.html_url }} BUILD_URL: ${{ env.BUILD_URL }} run: | - gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" \ No newline at end of file + gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" From ca6463f69eafd8f9e1b9b3c3981330c83b6434e0 Mon Sep 17 00:00:00 2001 From: chinweikemichael Date: Thu, 15 May 2025 00:28:53 +0100 Subject: [PATCH 12/12] chore: removed unused jobs --- .github/workflows/preview-android-feature.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/preview-android-feature.yml b/.github/workflows/preview-android-feature.yml index b788f12..38933db 100644 --- a/.github/workflows/preview-android-feature.yml +++ b/.github/workflows/preview-android-feature.yml @@ -35,15 +35,4 @@ jobs: - name: Trigger EAS Android build (preview) id: eas_build - run: | - eas build --platform android --profile preview --non-interactive --json > build.json - BUILD_URL=$(cat build.json | jq -r '.[0].artifacts.buildUrl') - echo "BUILD_URL=$BUILD_URL" >> $GITHUB_ENV - - - name: Post PR comment with preview link - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_URL: ${{ github.event.pull_request.html_url }} - BUILD_URL: ${{ env.BUILD_URL }} - run: | - gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" + run: eas build --platform android --profile preview --non-interactive \ No newline at end of file