Add/#19 design system #15
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: Barrion PR Check | |
| # 워크플로우 트리거 설정: main 또는 develop 브랜치로 PR이 생성될 때 실행 | |
| on: | |
| pull_request: | |
| branches: [ main, develop ] | |
| # 실행할 작업 정의 | |
| jobs: | |
| # 'build'라는 작업 정의 | |
| build: | |
| # 작업을 실행할 환경: 최신 Ubuntu 버전 | |
| runs-on: ubuntu-latest | |
| # 작업의 단계 정의 | |
| steps: | |
| # 1. 저장소 코드 체크아웃: GitHub 저장소의 코드를 작업 환경으로 가져옴 | |
| - uses: actions/checkout@v4 | |
| # 2. JDK 설정: 안드로이드 앱 빌드에 필요한 자바 환경 설정 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' # 자바 버전 17 사용 | |
| distribution: 'temurin' # Temurin(AdoptOpenJDK) 배포판 사용 | |
| cache: gradle # Gradle 의존성 캐싱으로 빌드 속도 향상 | |
| # 3. Gradle 실행 권한 부여: gradlew 스크립트에 실행 권한 추가 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # 4. Gradle 및 AndroidX 설정: 빌드 성능 및 호환성 설정 | |
| - name: Setup Gradle and AndroidX | |
| run: | | |
| # Gradle 메모리 설정: 최대 4GB 힙 메모리와 1GB 메타스페이스 | |
| echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dkotlin.daemon.jvm.options=-Xmx2g" > gradle.properties | |
| # 병렬 빌드 활성화: 멀티코어 활용으로 빌드 속도 향상 | |
| echo "org.gradle.parallel=true" >> gradle.properties | |
| # AndroidX 라이브러리 사용 설정: 최신 안드로이드 지원 라이브러리 사용 | |
| echo "android.useAndroidX=true" >> gradle.properties | |
| # Jetifier 활성화: 구 지원 라이브러리를 AndroidX로 자동 변환 | |
| echo "android.enableJetifier=true" >> gradle.properties | |
| # 5. local.properties 파일 생성: 로컬 개발 환경 설정 파일 생성 | |
| # (보통 SDK 위치, API 키 등이 포함되지만, CI 환경에서는 빈 파일로 생성) | |
| - name: Create local.properties | |
| run: touch local.properties | |
| # 6. APK 빌드: 디버그 버전 APK 생성 | |
| - name: Build Debug APK | |
| run: ./gradlew assembleDebug --warning-mode=all # 모든 경고를 표시하며 빌드 | |
| continue-on-error: true # 빌드 실패해도 워크플로우 계속 진행 | |
| # 7. APK 아티팩트 업로드: 생성된 APK를 GitHub에 저장 | |
| - name: Upload APK | |
| if: success() || failure() # 이전 단계 성공 또는 실패 모두에서 실행 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: barrion-debug # 아티팩트 이름 설정 | |
| path: app/build/outputs/apk/debug/app-debug.apk # 업로드할 파일 경로 | |
| if-no-files-found: ignore # 파일이 없어도 오류 발생하지 않음 |