@@ -35,15 +35,10 @@ jobs:
35
35
uses : actions/setup-node@v4
36
36
with :
37
37
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"
44
39
45
40
- name : " 🧩 Install dependencies (ci)"
46
- run : pnpm install --frozen-lockfile
41
+ run : npm ci
47
42
48
43
# ========================
49
44
# 🔄 Version Management
@@ -98,40 +93,11 @@ jobs:
98
93
# ========================
99
94
# 🔐 EAS Setup & Auth
100
95
# ========================
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
-
110
96
- name : " ⚙️ Install EAS CLI"
111
- run : pnpm add -g eas-cli@latest
97
+ run : npm install -g eas-cli@latest
112
98
113
99
- 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
135
101
136
102
# ========================
137
103
# 🏗️ Build Execution
@@ -141,7 +107,7 @@ jobs:
141
107
run : |
142
108
echo "🔄 Initializing build process..."
143
109
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)
145
111
echo "Raw build output: $BUILD_JSON"
146
112
BUILD_ID=$(echo "$BUILD_JSON" | jq -r '.[0].id')
147
113
if [[ -z "$BUILD_ID" || "$BUILD_ID" == "null" ]]; then
@@ -171,22 +137,16 @@ jobs:
171
137
uses : actions/setup-node@v4
172
138
with :
173
139
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
180
140
181
141
- name : " 📦 Install Dependencies"
182
- run : pnpm install --frozen-lockfile
142
+ run : npm ci
183
143
184
144
# ========================
185
145
# 📦 Dependency Management
186
146
# ========================
187
147
- name : " 🧰 Install Build Tools"
188
148
run : |
189
- pnpm add -g eas-cli@latest
149
+ npm install -g eas-cli@latest
190
150
sudo apt-get update
191
151
sudo apt-get install -y jq curl dotenv
192
152
@@ -201,7 +161,7 @@ jobs:
201
161
echo "🔍 Starting build monitoring for BUILD_ID: $BUILD_ID"
202
162
203
163
# Initial check without JSON for better error visibility
204
- eas build:view $BUILD_ID || true
164
+ npx eas build:view $BUILD_ID || true
205
165
206
166
RETRY_COUNT=0
207
167
MAX_RETRIES=120
@@ -211,7 +171,7 @@ jobs:
211
171
echo -e "\n=== Attempt $((RETRY_COUNT+1))/$MAX_RETRIES ==="
212
172
213
173
# 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)
215
175
echo "📄 Raw API response: $BUILD_STATUS_JSON"
216
176
217
177
# Validate JSON and check for empty response
@@ -238,14 +198,17 @@ jobs:
238
198
echo "✅ APK_URL=$APK_URL" >> $GITHUB_ENV
239
199
exit 0
240
200
;;
201
+
241
202
"ERRORED"|"CANCELLED")
242
203
echo "❌ Build failed! Error details:"
243
204
echo "$BUILD_STATUS_JSON" | jq .
244
205
exit 1
245
206
;;
207
+
246
208
"NEW"|"IN_QUE"|"IN_PROGRESS"|"PENDING")
247
209
echo "⏳ Build is still in progress..."
248
210
;;
211
+
249
212
*)
250
213
echo "❌ Unknown build status: $BUILD_STATUS"
251
214
exit 1
@@ -268,7 +231,8 @@ jobs:
268
231
id : download
269
232
run : |
270
233
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')
272
236
if [[ -z "$APK_URL" || "$APK_URL" == "null" ]]; then
273
237
echo "❌ Error: No APK URL found!"
274
238
exit 1
0 commit comments