diff --git a/.github/workflows/mavenBuild.yml b/.github/workflows/mavenBuild.yml new file mode 100644 index 00000000..93f00c17 --- /dev/null +++ b/.github/workflows/mavenBuild.yml @@ -0,0 +1,58 @@ +# This workflow will build a Java project with Maven, 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-maven + +# 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. + +name: Maven_Build + +on: + push: + branches: [ "contribution" ] + pull_request: + branches: [ "contribution" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: # Oracle Java SE Development Kit is only available for version 17 and later. + distribution: [ 'zulu', 'temurin', 'adopt', 'liberica', 'corretto', 'semeru' ] + os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + java : [ '8' ] + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java }} + distribution: ${{ matrix.distribution }} + cache: maven + + # Caching dependencies + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Get Current Time + uses: 1466587594/get-current-time@v2 + id: current-time + with: + format: YYYY-MM-DDTHH:mm:ss + utcOffset: "+09:00" # 기준이 UTC이기 때문에 한국시간인 KST를 맞추기 위해 +9시간 추가 + + - name: Print Current Time + run: echo "Current Time=${{steps.current-time.outputs.formattedTime}}" # current-time 에서 지정한 포맷대로 현재 시간 출력 + shell: bash + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + # - name: Update dependency graph + # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6