Skip to content

[WHD-283] CICD: Test github action #26

[WHD-283] CICD: Test github action

[WHD-283] CICD: Test github action #26

name: Firebase App Distribution For Debug APK
on:
push:
branches:
- WHD-283_cicd-try_test_cicd_for_firebase_app_distribution
pull_request:
branches:
- WHD-283_cicd-try_test_cicd_for_firebase_app_distribution
jobs:
build:
name: Firebase App Distribution For Debug APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Java 환경 설정
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Flutter 환경 설정
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.1'
channel: 'stable'
- name: 커스텀 디버그 키스토어 설정
run: |
mkdir -p "$HOME/.android"
echo "${{ secrets.DEBUG_KEYSTORE_BASE64 }}" | base64 --decode > "$HOME/.android/debug.keystore"
- name: Firebase 및 환경 설정 파일 생성
run: |
# Firebase 설정 파일
echo '${{ secrets.FIREBASE_JSON }}' > firebase.json
echo '${{ secrets.FIREBASE_OPTIONS_DART }}' > lib/firebase_options.dart
cat lib/firebase_options.dart
echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
echo '${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}' > ios/Runner/GoogleService-Info.plist
# 환경 변수 설정
echo "V1_SERVER_BASE_URL=${{ secrets.V1_SERVER_BASE_URL }}" > .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
- name: 의존성 설치
run: flutter pub get
- name: 디버그 APK 빌드
run: flutter build apk --debug
- name: Firebase App Distribution에 업로드
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
groups: team8901
file: build/app/outputs/flutter-apk/app-debug.apk