Skip to content

Merge pull request #203 from team-winey/dev #159

Merge pull request #203 from team-winey/dev

Merge pull request #203 from team-winey/dev #159

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Winey-Server CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1) μ›Œν¬ν”Œλ‘œμš° μ‹€ν–‰ μ „ 기본적으둜 체크아웃 ν•„μš”
- name: checkout
uses: actions/checkout@v3
# 2) JDK 11버전 μ„€μΉ˜, λ‹€λ₯Έ JDK 버전을 μ‚¬μš©ν•˜λ‹€λ©΄ μˆ˜μ •
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
# 3) ν™˜κ²½λ³€μˆ˜ 파일 생성
- name: make application.properties 파일 생성
run: |
## create application.yml
cd ./src/main/resources
# application.yml 파일 생성
touch ./application.yml
# GitHub-Actions μ—μ„œ μ„€μ •ν•œ 값을 application.yml νŒŒμΌμ— μ“°κΈ°
echo "${{ secrets.WINEY_APPLICATION }}" >> ./application.yml
# application.yml 파일 확인
cat ./application.yml
# winey-firebase.json 파일 생성
touch ./winey-firebase.json
# GitHub-Actions μ—μ„œ μ„€μ •ν•œ 값을 winey-firebase.json νŒŒμΌμ— μ“°κΈ°
echo "${{ secrets.WINEY_FIREBASE }}" >> ./winey-firebase.json
# winey-firebase.json 파일 확인
cat ./winey-firebase.json
shell: bash
# 이 μ›Œν¬ν”Œλ‘œμš°λŠ” gradle build
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle # μ‹€μ œ application build(-x μ˜΅μ…˜μ„ 톡해 testλŠ” μ œμ™Έ)
run: ./gradlew build -x test