Skip to content

Commit 2dae8c3

Browse files
committed
Reverting back to previous version.
1 parent 38e2924 commit 2dae8c3

File tree

1 file changed

+94
-73
lines changed

1 file changed

+94
-73
lines changed

Diff for: .github/workflows/eas-android-build.yml

+94-73
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: 🚠EAS Android Build & Smart Release
1+
name: 🚀 EAS Android Build & Smart Release
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76
workflow_dispatch:
87

98
env:
@@ -12,7 +11,7 @@ env:
1211

1312
jobs:
1413
build-android:
15-
name: 🔠Build Android - Version Manager
14+
name: 🔨 Build Android - Version Manager
1615
runs-on: ubuntu-latest
1716
outputs:
1817
build_id: ${{ steps.build.outputs.BUILD_ID }}
@@ -21,46 +20,55 @@ jobs:
2120
build_date: ${{ steps.version-control.outputs.build_date }}
2221
is_production: ${{ steps.version-control.outputs.is_production }}
2322
steps:
24-
# Repository Setup
25-
- name: "📠Checkout (Full History)"
23+
# ========================
24+
# 🛠️ Repository Setup
25+
# ========================
26+
- name: "📦 Checkout (Full History)"
2627
uses: actions/checkout@v4
2728
with:
2829
fetch-depth: 0
2930

30-
# Environment Configuration
31-
- name: "📠Setup Node.js 20.x"
31+
# ========================
32+
# ⚙️ Environment Configuration
33+
# ========================
34+
- name: "📦 Setup Node.js 20.x"
3235
uses: actions/setup-node@v4
3336
with:
3437
node-version: 20.x
38+
# NOTE: Removed cache: "pnpm" to avoid expecting pnpm pre-installed
3539

36-
- name: "🔠Install pnpm"
40+
- name: "🔧 Install pnpm"
3741
run: |
3842
npm install -g pnpm
3943
pnpm --version
4044
41-
- name: "🧠Install dependencies (ci)"
45+
- name: "🧩 Install dependencies (ci)"
4246
run: pnpm install --frozen-lockfile
4347

44-
# Version Management
45-
- name: "🔠Update Production Version"
48+
# ========================
49+
# 🔄 Version Management
50+
# ========================
51+
- name: "🔄 Update Production Version"
4652
if: github.ref == 'refs/heads/main'
4753
run: node scripts/bumpVersion.js
4854

49-
- name: "🔠Configure Git for Automation"
55+
- name: "🔧 Configure Git for Automation"
5056
if: github.ref == 'refs/heads/main'
5157
run: |
5258
git config --global user.name "GitHub Actions"
5359
git config --global user.email "[email protected]"
5460
55-
- name: "💠Commit Version Update"
61+
- name: "💾 Commit Version Update"
5662
if: github.ref == 'refs/heads/main'
5763
run: |
5864
git add version.json
5965
git commit -m "chore: Auto-increment version [skip ci]"
6066
git push
6167
62-
# Version Tagging
63-
- name: "ðŸï¸ Set CI/CD Versions"
68+
# ========================
69+
# 📌 Version Tagging
70+
# ========================
71+
- name: "🏷️ Set CI/CD Versions"
6472
id: version-control
6573
run: |
6674
# Use version from version.json (requires jq)
@@ -87,8 +95,10 @@ jobs:
8795
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
8896
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
8997
90-
# EAS Setup & Auth
91-
- name: "🔠Setup pnpm global bin"
98+
# ========================
99+
# 🔐 EAS Setup & Auth
100+
# ========================
101+
- name: "🔧 Setup pnpm global bin"
92102
env:
93103
SHELL: /bin/bash
94104
run: |
@@ -100,12 +110,14 @@ jobs:
100110
- name: "⚙️ Install EAS CLI"
101111
run: pnpm add -g eas-cli@latest
102112

103-
- name: "🔠Verify Expo Credentials"
113+
- name: "🔐 Verify Expo Credentials"
104114
run: eas whoami --token $EXPO_TOKEN
105115
env:
106116
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
107117

108-
# Force reinstallation of dependencies
118+
# ========================
119+
# Ensure consistent pnpm store: Force reinstallation of dependencies
120+
# ========================
109121
- name: "Set pnpm global store directory"
110122
run: pnpm config set store-dir "$HOME/.local/share/pnpm/store" --global
111123

@@ -115,23 +127,19 @@ jobs:
115127
- name: "Install @expo/config-plugins"
116128
run: pnpm add @expo/config-plugins
117129

130+
# ========================
118131
# Install @babel/runtime to resolve bundling error
132+
# ========================
119133
- name: "Install @babel/runtime"
120134
run: pnpm add @babel/runtime
121135

122-
# Debug Dependency Tree
123-
- name: "🔠Debug Dependency Tree"
124-
run: |
125-
echo "Listing installed dependencies..."
126-
pnpm list --depth=0
127-
echo "Checking for expo-constants..."
128-
ls node_modules/expo-constants || echo "expo-constants not found!"
129-
130-
# Build Execution
131-
- name: "🚠Trigger EAS Build"
136+
# ========================
137+
# 🏗️ Build Execution
138+
# ========================
139+
- name: "🚀 Trigger EAS Build"
132140
id: build
133141
run: |
134-
echo "🔠Initializing build process..."
142+
echo "🔄 Initializing build process..."
135143
sudo apt-get install -y jq
136144
BUILD_JSON=$(eas build -p android --profile production --non-interactive --json)
137145
echo "Raw build output: $BUILD_JSON"
@@ -147,43 +155,50 @@ jobs:
147155
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
148156

149157
download-apk:
150-
name: "📠APK Artifact Handler"
158+
name: "📥 APK Artifact Handler"
151159
runs-on: ubuntu-latest
152160
needs: build-android
153161
outputs:
154162
apk_path: ${{ steps.download.outputs.APK_PATH }}
155163
steps:
156-
# Environment Setup
157-
- name: "📠Checkout Repository"
164+
# ========================
165+
# 🛠️ Environment Setup
166+
# ========================
167+
- name: "📦 Checkout Repository"
158168
uses: actions/checkout@v4
159169

160170
- name: "⚙️ Setup Node.js"
161171
uses: actions/setup-node@v4
162172
with:
163173
node-version: 20.x
174+
# NOTE: Removed cache setting here as well
164175

165-
- name: "🔠Install pnpm"
176+
- name: "🔧 Install pnpm"
166177
run: |
167178
npm install -g pnpm
168179
pnpm --version
169180
170-
- name: "📠Install Dependencies"
181+
- name: "📦 Install Dependencies"
171182
run: pnpm install --frozen-lockfile
172183

173-
# Dependency Management
174-
- name: "🧠Install Build Tools"
184+
# ========================
185+
# 📦 Dependency Management
186+
# ========================
187+
- name: "🧰 Install Build Tools"
175188
run: |
176189
pnpm add -g eas-cli@latest
177190
sudo apt-get update
178191
sudo apt-get install -y jq curl dotenv
179192
180-
# Build Monitoring
193+
# ========================
194+
# 🔍 Build Monitoring
195+
# ========================
181196
- name: "⏳ Wait for Build Completion"
182197
run: |
183198
echo "⏰ Monitoring build status..."
184199
cd $GITHUB_WORKSPACE
185200
BUILD_ID=${{ needs.build-android.outputs.build_id }}
186-
echo "🔠Starting build monitoring for BUILD_ID: $BUILD_ID"
201+
echo "🔍 Starting build monitoring for BUILD_ID: $BUILD_ID"
187202
188203
# Initial check without JSON for better error visibility
189204
eas build:view $BUILD_ID || true
@@ -194,10 +209,10 @@ jobs:
194209
195210
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
196211
echo -e "\n=== Attempt $((RETRY_COUNT+1))/$MAX_RETRIES ==="
197-
212+
198213
# Fetch build status in JSON format
199214
BUILD_STATUS_JSON=$(eas build:view --json $BUILD_ID)
200-
echo "📠Raw API response: $BUILD_STATUS_JSON"
215+
echo "📄 Raw API response: $BUILD_STATUS_JSON"
201216
202217
# Validate JSON and check for empty response
203218
if ! echo "$BUILD_STATUS_JSON" | jq empty >/dev/null 2>&1 || [[ -z "$BUILD_STATUS_JSON" ]]; then
@@ -210,7 +225,7 @@ jobs:
210225
BUILD_STATUS=$(echo "$BUILD_STATUS_JSON" | jq -r '.status')
211226
ERROR_MESSAGE=$(echo "$BUILD_STATUS_JSON" | jq -r '.error.message // empty')
212227
213-
echo "🔠Parsed status: $BUILD_STATUS"
228+
echo "🔍 Parsed status: $BUILD_STATUS"
214229
[[ -n "$ERROR_MESSAGE" ]] && echo "❌ Error message: $ERROR_MESSAGE"
215230
216231
case $BUILD_STATUS in
@@ -228,7 +243,7 @@ jobs:
228243
echo "$BUILD_STATUS_JSON" | jq .
229244
exit 1
230245
;;
231-
"NEW"|"IN_QUEUE"|"IN_PROGRESS"|"PENDING")
246+
"NEW"|"IN_QUE"|"IN_PROGRESS"|"PENDING")
232247
echo "⏳ Build is still in progress..."
233248
;;
234249
*)
@@ -246,95 +261,101 @@ jobs:
246261
env:
247262
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
248263

249-
# Artifact Handling
250-
- name: "📠Download APK"
264+
# ========================
265+
# 📦 Artifact Handling
266+
# ========================
267+
- name: "📥 Download APK"
251268
id: download
252269
run: |
253-
echo "🔠Retrieving APK URL..."
270+
echo "🔽 Retrieving APK URL..."
254271
APK_URL=$(eas build:view --json ${{ needs.build-android.outputs.build_id }} | jq -r '.artifacts.buildUrl')
255272
if [[ -z "$APK_URL" || "$APK_URL" == "null" ]]; then
256273
echo "❌ Error: No APK URL found!"
257274
exit 1
258275
fi
259-
echo "📠Downloading APK from $APK_URL..."
276+
echo "📥 Downloading APK from $APK_URL..."
260277
curl -L "$APK_URL" -o app-release.apk
261278
echo "APK_PATH=app-release.apk" >> $GITHUB_OUTPUT
262279
263-
- name: "📠Upload Artifact"
280+
- name: "📤 Upload Artifact"
264281
uses: actions/upload-artifact@v4
265282
with:
266283
name: android-apk
267284
path: app-release.apk
268285

269286
generate-changelog:
270-
name: "📠Changelog Generator"
287+
name: "📜 Changelog Generator"
271288
runs-on: ubuntu-latest
272289
needs: build-android
273290
outputs:
274291
changelog: ${{ steps.changelog.outputs.CHANGELOG }}
275292
steps:
276-
# Repository Setup
277-
- name: "📠Checkout with Full History"
293+
# ========================
294+
# 🛠️ Repository Setup
295+
# ========================
296+
- name: "📂 Checkout with Full History"
278297
uses: actions/checkout@v4
279298
with:
280299
fetch-depth: 0
281300

282-
# Changelog Generation
283-
- name: "📠Create Release Notes"
301+
# ========================
302+
# 📄 Changelog Generation
303+
# ========================
304+
- name: "📋 Create Release Notes"
284305
id: changelog
285306
run: |
286-
echo "📠Generating changelog from git history..."
307+
echo "📝 Generating changelog from git history..."
287308
CHANGELOG=$(git log --pretty=format:"- %s (%h) by %an" -n 15)
288309
echo "$CHANGELOG" > changelog.txt
289310
290311
# FIXED OUTPUT HANDLING (ONLY CHANGE)
291312
delimiter=$(openssl rand -hex 6)
292-
echo "CHANGELOG<<$delimiter" >> $GITHUB_OUTPUT
313+
echo "CHANGELOG<<${delimiter}" >> $GITHUB_OUTPUT
293314
cat changelog.txt >> $GITHUB_OUTPUT
294-
echo "$delimiter" >> $GITHUB_OUTPUT
315+
echo "${delimiter}" >> $GITHUB_OUTPUT
295316
296-
- name: "📠Upload Changelog"
317+
- name: "📤 Upload Changelog"
297318
uses: actions/upload-artifact@v4
298319
with:
299320
name: changelog
300321
path: changelog.txt
301322

302323
create-release:
303-
name: "🚠Smart Release Publisher"
324+
name: "🚀 Smart Release Publisher"
304325
runs-on: ubuntu-latest
305-
needs:
306-
- build-android
307-
- download-apk
308-
- generate-changelog
326+
needs: [build-android, download-apk, generate-changelog]
309327
steps:
310-
# Artifact Retrieval
311-
- name: "📠Get APK Artifact"
328+
# ========================
329+
# 📥 Artifact Retrieval
330+
# ========================
331+
- name: "📦 Get APK Artifact"
312332
uses: actions/download-artifact@v4
313333
with:
314334
name: android-apk
315335

316-
- name: "📠Get Changelog"
336+
- name: "📄 Get Changelog"
317337
uses: actions/download-artifact@v4
318338
with:
319339
name: changelog
320340

321-
# Release Creation
322-
- name: "ðŸŽï¸ Determine Release Type"
341+
# ========================
342+
# 🏷️ Release Creation
343+
# ========================
344+
- name: "🎚️ Determine Release Type"
323345
id: release-type
324346
run: |
325-
echo "🔠Detecting release type..."
347+
echo "🔍 Detecting release type..."
326348
if [ "${{ needs.build-android.outputs.is_production }}" = "true" ]; then
327-
echo "🟠Production release detected"
349+
echo "🟢 Production release detected"
328350
RELEASE_TAG="v${{ needs.build-android.outputs.app_version }}"
329351
RELEASE_TITLE="Production Release v${{ needs.build-android.outputs.app_version }}"
330352
else
331-
echo "🟠Nightly build detected"
353+
echo "🟡 Nightly build detected"
332354
RELEASE_TAG="nightly-${{ needs.build-android.outputs.build_date }}"
333355
RELEASE_TITLE="Nightly Build (${{ needs.build-android.outputs.build_date }})"
334356
fi
335357
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_OUTPUT
336-
337-
- name: "🎠Publish GitHub Release"
358+
- name: "🎉 Publish GitHub Release"
338359
uses: softprops/action-gh-release@v2
339360
with:
340361
tag_name: ${{ steps.release-type.outputs.RELEASE_TAG }}

0 commit comments

Comments
 (0)