From 14114f574cc3394873c2b629339ecd807191da6a Mon Sep 17 00:00:00 2001 From: Pavlo Tytarchuk Date: Fri, 9 Jun 2023 11:48:27 +0200 Subject: [PATCH] DAT-15072. adding build and package step to pull-request.yml --- .github/workflows/pull-request.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 46b24368..3c7cb9cc 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -9,6 +9,42 @@ on: push: jobs: + build: + name: Build & Package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'temurin' + cache: 'maven' + + - name: Build and Package + run: mvn -B dependency:go-offline clean package -DskipTests=true + + - name: Get Artifact ID + id: get-artifact-id + run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" + + - name: Save Artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.get-artifact-id.outputs.artifact_id }}-artifacts + path: | + target/* + + - name: Save Event File + uses: actions/upload-artifact@v3 + with: + name: Event File + path: ${{ github.event_path }} + + outputs: + artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }} + unit-test: name: Unit Tests - Java ${{ matrix.java }} runs-on: ubuntu-latest