-
Notifications
You must be signed in to change notification settings - Fork 126
50 lines (44 loc) · 1.37 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build with Maven
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
node: ['10.x']
java: [1.8]
steps:
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ matrix.os }}-${{ matrix.java }}-${{ matrix.node }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.java }}-${{ matrix.node }}-maven-
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ matrix.os }}-${{ matrix.java }}-${{ matrix.node }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.java }}-${{ matrix.node }}-npm-
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn clean install
- uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-latest'
with:
name: wso2am-analytics-${{ matrix.os }}-java${{ matrix.java }}-node${{ matrix.node }}
path: product/distribution/target/*.zip