SongodaCore/.github/workflows/maven.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2021-01-19 19:20:57 +01:00
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build SongodaCore
on:
push:
2021-07-08 15:47:15 +02:00
branches: [ master, development ]
2021-01-19 19:20:57 +01:00
pull_request:
2021-07-08 15:33:44 +02:00
types: [ opened, synchronize, reopened ]
2021-01-19 19:20:57 +01:00
jobs:
build:
2021-07-08 15:47:15 +02:00
name: Build
2021-01-19 19:20:57 +01:00
runs-on: ubuntu-latest
steps:
2021-07-08 15:47:15 +02:00
# Setup Java
- uses: actions/setup-java@v2
2021-07-08 15:33:44 +02:00
with:
java-version: 16
2021-07-08 15:47:15 +02:00
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
2021-07-08 15:33:44 +02:00
- name: Build with Maven
2021-07-08 15:47:15 +02:00
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