From dd4298a31025280fc1a7825edde57b1261cf3ff6 Mon Sep 17 00:00:00 2001 From: Skullian <133133667+Skullians@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:18:55 +0100 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 00000000..b6b97852 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches-ignore: + - dependabot/** + pull_request: + +jobs: + build: + name: Maven Build + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 17, 21 ] + + steps: + - name: Git checkout + uses: actions/checkout@v4 + + - name: Setup JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.java }} + + - name: Build with Maven + run: | + mvn --version + mvn --batch-mode --no-transfer-progress package + echo "artifact_name=$(mvn help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)" >> $GITHUB_ENV + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + if: matrix.java == 17 + with: + name: ${{ env.artifact_name }} + path: | + target/*.jar + !target/original-*.jar