Skip to content

[TOONPICK] v 0.1.1

[TOONPICK] v 0.1.1 #9

Workflow file for this run

name: Backend Build
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1️. 저장소 체크아웃
- name: Checkout repository
uses: actions/checkout@v3
# 2️. JDK 17 설정
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
# 3️. Gradle 캐시 설정 (빌드 속도 최적화)
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
# 4️. Gradle 실행 권한 추가
- name: Grant execute permission for Gradle
run: chmod +x backend/gradlew
# 5️. Spring Boot 빌드
- name: Build with Gradle
run: |
cd backend
./gradlew clean build -x test --no-daemon --parallel --configure-on-demand
# 6. 빌드된 JAR 파일을 Artifacts로 저장
- name: Upload JAR Artifact
uses: actions/upload-artifact@v4
with:
name: backend-jar
path: backend/build/libs/*.jar