36 lines
901 B
YAML
36 lines
901 B
YAML
name: Java CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & Package
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Cache Maven packages
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
- name: Build with Maven
|
|
run: mvn -B package
|
|
- name: Stage build artifacts
|
|
run: |
|
|
mkdir staging
|
|
cp server/target/envoy-server-jar-with-dependencies.jar staging/envoy-server.jar
|
|
cp client/target/envoy-client*shaded.jar staging/envoy.jar
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: envoy-${{ matrix.os }}
|
|
path: staging
|