From 5f803d7345de2a3c3461077edc92be3df3eb79cb Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 14:39:50 +0200 Subject: [PATCH 01/11] add Gh runner --- .github/workflows/eas-build.yml | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/eas-build.yml diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml new file mode 100644 index 0000000..2b04257 --- /dev/null +++ b/.github/workflows/eas-build.yml @@ -0,0 +1,67 @@ +# .github/workflows/local-eas-build.yml + +name: Local EAS Build PR Check + +permissions: + contents: read + +on: + pull_request: + branches: + - main + +jobs: + android_build: + name: Android Local Build (Preview) + runs-on: linux-arm-medium + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: "npm" + + - name: Install EAS CLI + run: npm install -g eas-cli + + - name: Install Project Dependencies + run: npm ci + + - name: Run EAS Local Android Build (Preview Profile) + # eas build --local will automatically trigger your eas-build-pre-install + # and eas-build-post-install hooks defined in package.json. + # It will handle Rust tool installation and bindings generation. + run: eas build --local --platform android --profile preview --non-interactive + + - name: Indicate Android Build Success + run: echo "✅ Android local build successful!" + + ios_simulator_build: + name: iOS Simulator Local Build (Preview) + runs-on: linux-arm-medium + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: "npm" + + - name: Install EAS CLI + run: npm install -g eas-cli + + - name: Install Project Dependencies + run: npm ci + + - name: Run EAS Local iOS Build (Preview Profile) + run: eas build --local --platform ios --profile preview --non-interactive + + - name: Indicate iOS Build Success + run: echo "✅ iOS (device) local build successful!" From c3e4b55c5526f1d08b9fba5ac01b517a3d90f09c Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 14:48:13 +0200 Subject: [PATCH 02/11] add expo token --- .github/workflows/eas-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 2b04257..084ef2b 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -14,6 +14,8 @@ jobs: android_build: name: Android Local Build (Preview) runs-on: linux-arm-medium + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} steps: - name: Checkout code @@ -43,6 +45,8 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) runs-on: linux-arm-medium + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} steps: - name: Checkout code From fdc8094e55f8db7908ec6965d83ef2a9405a290f Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 15:13:37 +0200 Subject: [PATCH 03/11] fix ci action --- .github/workflows/eas-build.yml | 53 +++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 084ef2b..4725067 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -1,4 +1,5 @@ -# .github/workflows/local-eas-build.yml +# .github/workflows/eas-build.yml +# Thank you to https://github.com/thomasread99/expo-workflows for the inspiration! name: Local EAS Build PR Check @@ -14,8 +15,6 @@ jobs: android_build: name: Android Local Build (Preview) runs-on: linux-arm-medium - env: - EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} steps: - name: Checkout code @@ -27,17 +26,33 @@ jobs: node-version: 18 cache: "npm" - - name: Install EAS CLI - run: npm install -g eas-cli + - name: Setup JDK + uses: actions/setup-java@v4 + with: + java-version: "17" + distribution: "temurin" - - name: Install Project Dependencies + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Setup Expo + uses: expo/expo-github-action@v8 + with: + expo-version: latest + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: Install dependencies run: npm ci - name: Run EAS Local Android Build (Preview Profile) - # eas build --local will automatically trigger your eas-build-pre-install - # and eas-build-post-install hooks defined in package.json. - # It will handle Rust tool installation and bindings generation. - run: eas build --local --platform android --profile preview --non-interactive + run: eas build --local --platform android --profile preview --non-interactive --output ${{ github.workspace }}/app-release.apk + + - name: Upload APK artifact + uses: actions/upload-artifact@v4 + with: + name: app-preview + path: ${{ github.workspace }}/app-release.apk - name: Indicate Android Build Success run: echo "✅ Android local build successful!" @@ -45,8 +60,6 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) runs-on: linux-arm-medium - env: - EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} steps: - name: Checkout code @@ -58,14 +71,24 @@ jobs: node-version: 18 cache: "npm" - - name: Install EAS CLI - run: npm install -g eas-cli + - name: Setup Expo + uses: expo/expo-github-action@v8 + with: + expo-version: latest + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} - name: Install Project Dependencies run: npm ci - name: Run EAS Local iOS Build (Preview Profile) - run: eas build --local --platform ios --profile preview --non-interactive + run: eas build --local --platform ios --profile preview --non-interactive --output ${{ github.workspace }}/app-release.ipa - name: Indicate iOS Build Success run: echo "✅ iOS (device) local build successful!" + + - name: Upload IPA artifact + uses: actions/upload-artifact@v4 + with: + name: app-preview + path: ${{ github.workspace }}/app-release.ipa From fd75c5a422f1942e7f21326c38f93a85b157624e Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 15:17:07 +0200 Subject: [PATCH 04/11] add mac runner for ios --- .github/workflows/eas-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 4725067..45e25f2 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -59,8 +59,7 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) - runs-on: linux-arm-medium - + runs-on: macos-latest steps: - name: Checkout code uses: actions/checkout@v4 From 88d3c8d3996f12072e9eaf3d7021ec934a05e703 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 15:23:09 +0200 Subject: [PATCH 05/11] try to fix sdk installation --- .github/workflows/eas-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 45e25f2..d7be95a 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -34,6 +34,8 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 + with: + packages: "platform-tools" - name: Setup Expo uses: expo/expo-github-action@v8 From a622a7ae5372408405cc6354d9766abe900c80c2 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 15:53:20 +0200 Subject: [PATCH 06/11] use macos runners, which have java, ndk and ios simulators installed --- .github/workflows/eas-build.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index d7be95a..7acb8a2 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -14,7 +14,7 @@ on: jobs: android_build: name: Android Local Build (Preview) - runs-on: linux-arm-medium + runs-on: macos-15 steps: - name: Checkout code @@ -26,17 +26,6 @@ jobs: node-version: 18 cache: "npm" - - name: Setup JDK - uses: actions/setup-java@v4 - with: - java-version: "17" - distribution: "temurin" - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - with: - packages: "platform-tools" - - name: Setup Expo uses: expo/expo-github-action@v8 with: @@ -61,7 +50,7 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) - runs-on: macos-latest + runs-on: macos-15 steps: - name: Checkout code uses: actions/checkout@v4 From 38ab980158b27b2c632a19d4fbc98d6680314988 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 16:26:42 +0200 Subject: [PATCH 07/11] remove duplicated names --- .github/workflows/eas-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 7acb8a2..56a7ca1 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -42,7 +42,7 @@ jobs: - name: Upload APK artifact uses: actions/upload-artifact@v4 with: - name: app-preview + name: app-preview-android path: ${{ github.workspace }}/app-release.apk - name: Indicate Android Build Success @@ -80,5 +80,5 @@ jobs: - name: Upload IPA artifact uses: actions/upload-artifact@v4 with: - name: app-preview + name: app-preview-ios path: ${{ github.workspace }}/app-release.ipa From 466385f2af82d32449eb078283a7390c115e280e Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 17:11:17 +0200 Subject: [PATCH 08/11] node version --- .github/workflows/eas-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 56a7ca1..36fbd5a 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: "npm" - name: Setup Expo @@ -58,7 +58,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: "npm" - name: Setup Expo From 944edd1b56a36f2fef338a5de343d8164e580055 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 17:21:58 +0200 Subject: [PATCH 09/11] bigger macos runners --- .github/workflows/eas-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 36fbd5a..e889502 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -14,7 +14,7 @@ on: jobs: android_build: name: Android Local Build (Preview) - runs-on: macos-15 + runs-on: macos-15-xl steps: - name: Checkout code @@ -50,7 +50,7 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) - runs-on: macos-15 + runs-on: macos-15-xl steps: - name: Checkout code uses: actions/checkout@v4 From de4c59bef9dec005130776951cd650667320ae78 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 17:23:16 +0200 Subject: [PATCH 10/11] cancel in progress --- .github/workflows/eas-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index e889502..651a5dc 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -6,6 +6,11 @@ name: Local EAS Build PR Check permissions: contents: read +# Add concurrency to cancel previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + on: pull_request: branches: From 83b2d6cd5123eb762de78f22dbbd3ced3f955641 Mon Sep 17 00:00:00 2001 From: Elias Tazartes Date: Mon, 26 May 2025 17:23:53 +0200 Subject: [PATCH 11/11] xlarge instead of xl --- .github/workflows/eas-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 651a5dc..e89640d 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -19,7 +19,7 @@ on: jobs: android_build: name: Android Local Build (Preview) - runs-on: macos-15-xl + runs-on: macos-15-xlarge steps: - name: Checkout code @@ -55,7 +55,7 @@ jobs: ios_simulator_build: name: iOS Simulator Local Build (Preview) - runs-on: macos-15-xl + runs-on: macos-15-xlarge steps: - name: Checkout code uses: actions/checkout@v4