feat: 엠티뷰 위치 조정 #44
This file contains hidden or 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
| name: Release Build & Deploy | |
| # 프로덕션 빌드: release 브랜치 → 프로덕션 서버 (www.taba.asia) | |
| # Android: AAB → Google Play Production | |
| # iOS: IPA → App Store Connect | |
| on: | |
| push: | |
| branches: [release] | |
| workflow_dispatch: | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.24.5' | |
| channel: 'stable' | |
| - run: flutter pub get | |
| - name: Setup Keystore | |
| run: | | |
| echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > android/app/keystore.jks | |
| - name: Build AAB | |
| env: | |
| KEYSTORE_PATH: keystore.jks | |
| KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| run: | | |
| echo "🚀 프로덕션 빌드 (서버: https://www.taba.asia/api/v1)" | |
| cd android/app | |
| flutter build appbundle --release \ | |
| --build-name=${{ github.ref_name }} \ | |
| --build-number=${{ github.run_number }} \ | |
| --dart-define=API_ENV=prod | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-prod-aab | |
| path: build/app/outputs/bundle/release/app-release.aab | |
| retention-days: 90 | |
| - name: Upload to Google Play | |
| if: success() && env.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON != '' | |
| env: | |
| GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} | |
| uses: r0adkll/upload-google-play@v1 | |
| continue-on-error: true | |
| with: | |
| serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }} | |
| packageName: com.coby.taba | |
| releaseFiles: build/app/outputs/bundle/release/app-release.aab | |
| track: production | |
| status: completed | |
| build-ios: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.24.5' | |
| channel: 'stable' | |
| - run: flutter pub get | |
| - name: Install CocoaPods dependencies | |
| run: | | |
| cd ios | |
| # Retry logic for pod install (network issues with GitHub) | |
| for i in {1..3}; do | |
| echo "Attempting pod install (attempt $i/3)..." | |
| if pod install --repo-update; then | |
| echo "Pod install succeeded" | |
| exit 0 | |
| else | |
| echo "Pod install failed, retrying in 10 seconds..." | |
| sleep 10 | |
| fi | |
| done | |
| echo "Pod install failed after 3 attempts" | |
| exit 1 | |
| - name: Setup Certificates | |
| if: env.APPLE_CERTIFICATE_BASE64 != '' | |
| env: | |
| APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_PROVISIONING_PROFILE_BASE64: ${{ secrets.APPLE_PROVISIONING_PROFILE_BASE64 }} | |
| run: | | |
| security create-keychain -p "" build.keychain || true | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "" build.keychain | |
| security set-keychain-settings -t 3600 -u build.keychain | |
| echo "$APPLE_CERTIFICATE_BASE64" | base64 -d > cert.p12 | |
| security import cert.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign || exit 1 | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain || true | |
| if [ -n "$APPLE_PROVISIONING_PROFILE_BASE64" ]; then | |
| echo "$APPLE_PROVISIONING_PROFILE_BASE64" | base64 -d > profile.mobileprovision | |
| TEMP_PLIST=$(mktemp) | |
| security cms -D -i profile.mobileprovision > "$TEMP_PLIST" | |
| PROFILE_UUID=$(/usr/libexec/PlistBuddy -c "Print UUID" "$TEMP_PLIST") | |
| PROFILE_NAME=$(/usr/libexec/PlistBuddy -c "Print Name" "$TEMP_PLIST" 2>/dev/null || echo "") | |
| PROFILE_TEAM_ID=$(/usr/libexec/PlistBuddy -c "Print TeamIdentifier:0" "$TEMP_PLIST" 2>/dev/null || echo "") | |
| rm -f "$TEMP_PLIST" | |
| mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
| cp profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/$PROFILE_UUID.mobileprovision | |
| chmod 644 ~/Library/MobileDevice/Provisioning\ Profiles/$PROFILE_UUID.mobileprovision | |
| /usr/libexec/PlistBuddy -c "Delete :provisioningProfiles" ios/ExportOptions-prod.plist 2>/dev/null || true | |
| /usr/libexec/PlistBuddy -c "Add :provisioningProfiles dict" ios/ExportOptions-prod.plist | |
| /usr/libexec/PlistBuddy -c "Add :provisioningProfiles:com.coby.taba string $PROFILE_UUID" ios/ExportOptions-prod.plist | |
| /usr/libexec/PlistBuddy -c "Set :signingStyle manual" ios/ExportOptions-prod.plist 2>/dev/null || \ | |
| /usr/libexec/PlistBuddy -c "Add :signingStyle string manual" ios/ExportOptions-prod.plist | |
| /usr/libexec/PlistBuddy -c "Set :teamID $PROFILE_TEAM_ID" ios/ExportOptions-prod.plist 2>/dev/null || \ | |
| /usr/libexec/PlistBuddy -c "Add :teamID string $PROFILE_TEAM_ID" ios/ExportOptions-prod.plist | |
| sed -i '' 's/CODE_SIGN_STYLE = Automatic;/CODE_SIGN_STYLE = Manual;/g' ios/Runner.xcodeproj/project.pbxproj || true | |
| sed -i '' 's/CODE_SIGN_IDENTITY = "Apple Development";/CODE_SIGN_IDENTITY = "Apple Distribution";/g' ios/Runner.xcodeproj/project.pbxproj || true | |
| sed -i '' "s/PROVISIONING_PROFILE_SPECIFIER = \"\";/PROVISIONING_PROFILE_SPECIFIER = \"$PROFILE_NAME\";/g" ios/Runner.xcodeproj/project.pbxproj || true | |
| fi | |
| - name: Build IPA | |
| run: | | |
| echo "🚀 프로덕션 빌드 (서버: https://www.taba.asia/api/v1)" | |
| flutter build ipa --release \ | |
| --build-name=${{ github.ref_name }} \ | |
| --build-number=${{ github.run_number }} \ | |
| --dart-define=API_ENV=prod \ | |
| --export-options-plist=ios/ExportOptions-prod.plist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-prod-ipa | |
| path: build/ios/ipa/*.ipa | |
| retention-days: 90 | |
| - name: Upload to App Store Connect | |
| if: success() && env.APP_STORE_CONNECT_API_KEY_ID != '' | |
| env: | |
| APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} | |
| APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }} | |
| run: | | |
| mkdir -p ~/private_keys | |
| echo "$APP_STORE_CONNECT_API_KEY" > ~/private_keys/AuthKey_$APP_STORE_CONNECT_API_KEY_ID.p8 | |
| chmod 600 ~/private_keys/AuthKey_$APP_STORE_CONNECT_API_KEY_ID.p8 | |
| IPA_FILE=$(find build/ios/ipa -name "*.ipa" | head -1) | |
| xcrun altool --upload-app --type ios --file "$IPA_FILE" \ | |
| --apiKey $APP_STORE_CONNECT_API_KEY_ID \ | |
| --apiIssuer $APP_STORE_CONNECT_ISSUER_ID || echo "⚠️ Upload failed, IPA saved as artifact" |