Update GitHub-Actions

This commit is contained in:
Christian Koop 2021-07-08 15:47:15 +02:00
parent 6dbf806e7d
commit e1742385c5
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
1 changed files with 26 additions and 6 deletions

View File

@ -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