--- name: eas-build-deploy description: > GUARDiA Messenger EAS Build 빌드 실행, 로그 분석, 배포 자동화 스킬. APK/AAB/IPA 빌드, 빌드 실패 진단, .easignore 관리, Gradle 설정 최적화 담당. 트리거: EAS 빌드, APK 빌드, Android/iOS 빌드, 빌드 실패, Gradle 오류, 스토어 빌드, eas build 명령어 관련 모든 요청 시 반드시 사용. --- # EAS Build 운영 가이드 ## 빌드 전 체크리스트 ```bash # 1. android/, ios/ 폴더 없는지 확인 ls C:\GUARDiA\app\android 2>/dev/null && echo "경고: 삭제 필요" || echo "OK" # 2. .easignore 확인 cat C:\GUARDiA\app\.easignore # 반드시 포함: android/, ios/ # 3. withGradleProps.js 확인 cat C:\GUARDiA\app\plugins\withGradleProps.js | grep enablePngCrunch # 반드시: false # 4. EAS 로그인 확인 npx eas-cli whoami ``` ## 빌드 명령어 ```bash cd C:\GUARDiA\app # Android 테스트 APK (가장 빠름, ~10분) npx eas-cli build --platform android --profile preview # Android 스토어 AAB npx eas-cli build --platform android --profile production # iOS IPA (Apple Developer $99/년 필요) npx eas-cli build --platform ios --profile production # 빌드 상태 확인 npx eas-cli build:view {BUILD_ID} --json ``` ## 빌드 실패 진단 절차 ```bash # 1. 빌드 ID로 로그 URL 추출 npx eas-cli build:view {BUILD_ID} --json | python3 -c " import json,sys d=json.load(sys.stdin) print('status:', d.get('status')) print('error:', d.get('error')) for url in d.get('logFiles', []): print('log:', url[:80]+'...') " # 2. 로그 다운로드 (압축 해제) curl -s "{LOG_URL}" | gunzip | grep -E "ERROR|FAIL|Exception" | tail -20 ``` ## eas.json 설정 ```json { "build": { "preview": { "distribution": "internal", "android": { "buildType": "apk", "image": "latest" } }, "production": { "android": { "buildType": "app-bundle", "image": "latest" } } } } ``` ## 빌드 성공 APK 설치 1. Expo 빌드 URL을 **안드로이드 폰 브라우저**에서 열기 2. Download 버튼 탭 3. 설정 → 보안 → 알 수 없는 앱 허용 (최초 1회) 4. APK 설치 자세한 이슈 이력: `references/eas-troubleshoot.md`