From e1742385c51062c9f350d78e07eaf00d827b5af9 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Thu, 8 Jul 2021 15:47:15 +0200 Subject: [PATCH] Update GitHub-Actions --- .github/workflows/maven.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a461e4da..40ea85f2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,19 +5,39 @@ name: Build SongodaCore on: push: - branches: [ master ] + branches: [ master, development ] pull_request: types: [ opened, synchronize, reopened ] jobs: build: + name: Build runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v1 + # Setup Java + - uses: actions/setup-java@v2 with: java-version: 16 + distribution: adopt + + # Checkout project files + - uses: actions/checkout@v2 + + # Caches + - name: 'Cache: Maven' + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + + # Build project - name: Build with Maven - run: mvn -B package --file pom.xml + run: 'mvn -B -Duser.name="GitHub Runner on $GITHUB_REPOSITORY (id=$GITHUB_RUN_ID)" clean package' + + # Upload build artifacts + - name: 'Upload Build Artifact: SongodaCore-*.jar' + uses: actions/upload-artifact@v2 + with: + name: EpicAnchors-artifacts + path: ./Core/target/SongodaCore-*.jar