From f8c071f9fe2c1f4f19a6be3a639fcac521a83b46 Mon Sep 17 00:00:00 2001 From: Sanghee Park Date: Wed, 6 Mar 2024 15:04:53 +0900 Subject: [PATCH] ci: integrate ci building process --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0ec4697 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + cache: 'maven' + - name: change version to SNAPSHOT + run: | + VER_TAG=$(git describe --tags --abbrev=0) + test -z "$VER_TAG" && VER_TAG="0.0.1" + mvn versions:set -DnewVersion=${VER_TAG}-SNAPSHOT + - name: Build with Maven + run: mvn package + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + # Artifact name + name: JavaProgramming.jar + # A file, directory or wildcard pattern that describes what to upload + path: target/**/sw14462-*.jar