forked from ata4/bspsrc
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (52 loc) · 1.61 KB
/
ant.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
51
52
53
54
55
56
57
58
59
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant
name: Java CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
compile:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ 11, 12, 13 ]
name: Java ${{ matrix.java }} compile
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: jdk
java-version: ${{ matrix.java }}
- name: Compile the Project
working-directory: .
run: mvn -B compile
build:
runs-on: ubuntu-20.04
needs: compile
name: Build the Maven Project
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
java-package: jdk
- name: Build and test project
run: mvn -B verify ; echo $GITHUB_WORKSPACE ; cd $GITHUB_WORKSPACE/target/ ; echo $GITHUB_WORKSPACE/target/ ; mv bspsrc-1.4.0-SNAPSHOT.jar bspsrc.jar ; ls ; mv bspsrc.jar $GITHUB_WORKSPACE/scripts ; ls
- name: Upload Maven build artifact
uses: actions/upload-artifact@v2
with:
name: bspsrc_release
path: scripts