-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
깃허브 액션을 이용한 파이어베이스 앱 배포 테스트 30
- Loading branch information
Showing
1 changed file
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,25 @@ jobs: | |
flutter-version: '3.24.1' | ||
channel: 'stable' | ||
|
||
- name: AVD(Android Virtual Device) 캐시 | ||
uses: actions/cache@v3 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ runner.os }} | ||
|
||
- name: 에뮬레이터 생성 | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
target: google_apis | ||
arch: x86_64 | ||
profile: Nexus 6 | ||
script: echo "에뮬레이터 생성 완료" | ||
|
||
- name: Key Store 생성 | ||
run: echo "${{ secrets.KEY_JKS_BASE64 }}" | base64 --decode > android/app/key.jks | ||
|
||
|
@@ -55,14 +74,38 @@ jobs: | |
echo "FIREBASE_IOS_CLIENT_ID=${{ secrets.FIREBASE_IOS_CLIENT_ID }}" >> .env | ||
echo "FIREBASE_IOS_BUNDLE_ID=${{ secrets.FIREBASE_IOS_BUNDLE_ID }}" >> .env | ||
- name: 플러터 | ||
- name: 설정 파일 확인 | ||
run: | | ||
echo "Checking configuration files..." | ||
ls -la firebase.json | ||
ls -la android/app/google-services.json | ||
cat .env | grep -v "KEY\|SECRET\|PASSWORD" | ||
- name: 플러터 클린 | ||
run: flutter clean | ||
|
||
- name: 의존성 설치 | ||
run: flutter pub get | ||
|
||
- name: 앱 실행 및 로그 확인 | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
target: google_apis | ||
arch: x86_64 | ||
profile: Nexus 6 | ||
script: | | ||
flutter run --verbose > flutter_run.log 2>&1 || true | ||
echo "===== Flutter Run Log =====" | ||
cat flutter_run.log | ||
echo "==========================" | ||
adb logcat -d > device.log | ||
echo "===== Device Log =====" | ||
cat device.log | ||
echo "=====================" | ||
- name: APK 빌드 | ||
run: flutter build apk --release --target-platform=android-arm64 | ||
run: flutter build apk --release --target-platform=android-arm64 --verbose | ||
|
||
- name: Firebase App Distribution에 업로드 | ||
uses: wzieba/[email protected] | ||
|
@@ -71,3 +114,13 @@ jobs: | |
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }} | ||
groups: team8901 | ||
file: build/app/outputs/flutter-apk/app-release.apk | ||
|
||
# 로그 파일을 아티팩트로 저장 | ||
- name: 로그 파일 업로드 | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: app-logs | ||
path: | | ||
flutter_run.log | ||
device.log |