Skip to content

Commit

Permalink
[WHD-283] CICD: Test github action
Browse files Browse the repository at this point in the history
깃허브 액션을 이용한 파이어베이스 앱 배포 테스트 30
  • Loading branch information
alsdn1360 committed Nov 24, 2024
1 parent d7ffc1c commit 5ec4233
Showing 1 changed file with 55 additions and 2 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/firebase_app_distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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]
Expand All @@ -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

0 comments on commit 5ec4233

Please sign in to comment.