@@ -35,15 +35,10 @@ jobs:
3535 uses : actions/setup-node@v4
3636 with :
3737 node-version : 20.x
38- # NOTE: Removed cache: "pnpm" to avoid expecting pnpm pre-installed
39-
40- - name : " 🔧 Install pnpm"
41- run : |
42- npm install -g pnpm
43- pnpm --version
38+ cache : " npm"
4439
4540 - name : " 🧩 Install dependencies (ci)"
46- run : pnpm install --frozen-lockfile
41+ run : npm ci
4742
4843 # ========================
4944 # 🔄 Version Management
@@ -98,40 +93,11 @@ jobs:
9893 # ========================
9994 # 🔐 EAS Setup & Auth
10095 # ========================
101- - name : " 🔧 Setup pnpm global bin"
102- env :
103- SHELL : /bin/bash
104- run : |
105- mkdir -p $HOME/.pnpm-global
106- echo "PNPM_HOME=$HOME/.pnpm-global" >> $GITHUB_ENV
107- echo "$HOME/.pnpm-global" >> $GITHUB_PATH
108- pnpm setup
109-
11096 - name : " ⚙️ Install EAS CLI"
111- run : pnpm add -g eas-cli@latest
97+ run : npm install -g eas-cli@latest
11298
11399 - name : " 🔐 Verify Expo Credentials"
114- run : eas whoami --token $EXPO_TOKEN
115- env :
116- EXPO_TOKEN : ${{ secrets.EXPO_TOKEN }}
117-
118- # ========================
119- # Ensure consistent pnpm store: Force reinstallation of dependencies
120- # ========================
121- - name : " Set pnpm global store directory"
122- run : pnpm config set store-dir "$HOME/.local/share/pnpm/store" --global
123-
124- - name : " Reinstall dependencies with new store"
125- run : pnpm install --force
126-
127- - name : " Install @expo/config-plugins"
128- run : pnpm add @expo/config-plugins
129-
130- # ========================
131- # Install @babel/runtime to resolve bundling error
132- # ========================
133- - name : " Install @babel/runtime"
134- run : pnpm add @babel/runtime
100+ run : npx eas whoami --token $EXPO_TOKEN
135101
136102 # ========================
137103 # 🏗️ Build Execution
@@ -141,7 +107,7 @@ jobs:
141107 run : |
142108 echo "🔄 Initializing build process..."
143109 sudo apt-get install -y jq
144- BUILD_JSON=$(eas build -p android --profile production --non-interactive --json)
110+ BUILD_JSON=$(npx eas build -p android --profile production --non-interactive --json)
145111 echo "Raw build output: $BUILD_JSON"
146112 BUILD_ID=$(echo "$BUILD_JSON" | jq -r '.[0].id')
147113 if [[ -z "$BUILD_ID" || "$BUILD_ID" == "null" ]]; then
@@ -171,22 +137,16 @@ jobs:
171137 uses : actions/setup-node@v4
172138 with :
173139 node-version : 20.x
174- # NOTE: Removed cache setting here as well
175-
176- - name : " 🔧 Install pnpm"
177- run : |
178- npm install -g pnpm
179- pnpm --version
180140
181141 - name : " 📦 Install Dependencies"
182- run : pnpm install --frozen-lockfile
142+ run : npm ci
183143
184144 # ========================
185145 # 📦 Dependency Management
186146 # ========================
187147 - name : " 🧰 Install Build Tools"
188148 run : |
189- pnpm add -g eas-cli@latest
149+ npm install -g eas-cli@latest
190150 sudo apt-get update
191151 sudo apt-get install -y jq curl dotenv
192152
@@ -201,7 +161,7 @@ jobs:
201161 echo "🔍 Starting build monitoring for BUILD_ID: $BUILD_ID"
202162
203163 # Initial check without JSON for better error visibility
204- eas build:view $BUILD_ID || true
164+ npx eas build:view $BUILD_ID || true
205165
206166 RETRY_COUNT=0
207167 MAX_RETRIES=120
@@ -211,7 +171,7 @@ jobs:
211171 echo -e "\n=== Attempt $((RETRY_COUNT+1))/$MAX_RETRIES ==="
212172
213173 # Fetch build status in JSON format
214- BUILD_STATUS_JSON=$(eas build:view --json $BUILD_ID)
174+ BUILD_STATUS_JSON=$(npx eas build:view --json $BUILD_ID)
215175 echo "📄 Raw API response: $BUILD_STATUS_JSON"
216176
217177 # Validate JSON and check for empty response
@@ -238,14 +198,17 @@ jobs:
238198 echo "✅ APK_URL=$APK_URL" >> $GITHUB_ENV
239199 exit 0
240200 ;;
201+
241202 "ERRORED"|"CANCELLED")
242203 echo "❌ Build failed! Error details:"
243204 echo "$BUILD_STATUS_JSON" | jq .
244205 exit 1
245206 ;;
207+
246208 "NEW"|"IN_QUE"|"IN_PROGRESS"|"PENDING")
247209 echo "⏳ Build is still in progress..."
248210 ;;
211+
249212 *)
250213 echo "❌ Unknown build status: $BUILD_STATUS"
251214 exit 1
@@ -268,7 +231,8 @@ jobs:
268231 id : download
269232 run : |
270233 echo "🔽 Retrieving APK URL..."
271- APK_URL=$(eas build:view --json ${{ needs.build-android.outputs.build_id }} | jq -r '.artifacts.buildUrl')
234+ # Use the build:view command to get a clean JSON response
235+ APK_URL=$(npx eas build:view --json ${{ needs.build-android.outputs.build_id }} | jq -r '.artifacts.buildUrl')
272236 if [[ -z "$APK_URL" || "$APK_URL" == "null" ]]; then
273237 echo "❌ Error: No APK URL found!"
274238 exit 1
0 commit comments