feat ( #1 ) : build-check.yml 추가 #1
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: Build Check | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build | |
| # 빌드 실패 시 브랜치 보호를 위한 스크립트 | |
| - name: Fail if build failed | |
| if: failure() | |
| run: exit 1 |