From 08b273ed4b264fc44d56e54812e96e5c748c1d47 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Sun, 16 Mar 2025 10:18:43 +0800 Subject: [PATCH] ci: add development build (#3136) * ci: add development build * update * update * update * name * simulator * cancel * push * update * name * Revert "update" This reverts commit 34e65dcbd13265e519f99c0575fd6b5f386c7d75. * path --- .github/workflows/build-eas-development.yml | 98 +++++++++++++++++++++ .github/workflows/build-eas.yml | 4 + apps/mobile/eas.json | 6 ++ 3 files changed, 108 insertions(+) create mode 100644 .github/workflows/build-eas-development.yml diff --git a/.github/workflows/build-eas-development.yml b/.github/workflows/build-eas-development.yml new file mode 100644 index 000000000..945c7d7d8 --- /dev/null +++ b/.github/workflows/build-eas-development.yml @@ -0,0 +1,98 @@ +name: Build iOS IPA for development + +on: + push: + branches: [dev, main] + paths: + - "apps/mobile/web-app/**" + - "apps/mobile/native/**" + - "apps/mobile/package.json" + pull_request: + branches: [dev, main] + paths: + - "apps/mobile/web-app/**" + - "apps/mobile/native/**" + - "apps/mobile/package.json" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build iOS IPA for device + runs-on: macos-latest + + steps: + - name: 📦 Checkout code + uses: actions/checkout@v4 + + - name: 📦 Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: true + - name: 🏗 Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + + - name: 📱 Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: 🔨 Build iOS IPA + run: | + cd apps/mobile + eas build --platform ios --profile development --non-interactive --local --output=./build.ipa + env: + CI: true + + # Optional: Upload artifact + - name: 📤 Upload IPA + uses: actions/upload-artifact@v4 + with: + name: app-ios + path: apps/mobile/build.ipa + retention-days: 90 + + build-simulator: + name: Build iOS IPA for simulator + runs-on: macos-latest + + steps: + - name: 📦 Checkout code + uses: actions/checkout@v4 + + - name: 📦 Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: true + - name: 🏗 Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + + - name: 📱 Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: 🔨 Build iOS IPA + run: | + cd apps/mobile + eas build --platform ios --profile ios-simulator --non-interactive --local --output=./build-simulator.ipa + env: + CI: true + + # Optional: Upload artifact + - name: 📤 Upload IPA + uses: actions/upload-artifact@v4 + with: + name: app-ios-simulator + path: apps/mobile/build-simulator.ipa + retention-days: 90 diff --git a/.github/workflows/build-eas.yml b/.github/workflows/build-eas.yml index 07e5cbc67..e695fb687 100644 --- a/.github/workflows/build-eas.yml +++ b/.github/workflows/build-eas.yml @@ -21,6 +21,10 @@ on: - production description: "Build profile" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build iOS IPA diff --git a/apps/mobile/eas.json b/apps/mobile/eas.json index 084e6fcf7..e8c595c57 100644 --- a/apps/mobile/eas.json +++ b/apps/mobile/eas.json @@ -9,6 +9,12 @@ "distribution": "internal", "channel": "development" }, + "ios-simulator": { + "extends": "development", + "ios": { + "simulator": true + } + }, "preview": { "distribution": "internal", "channel": "preview"