-
Notifications
You must be signed in to change notification settings - Fork 20
41 lines (36 loc) · 936 Bytes
/
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
# This workflow will build a Java project with Maven
name: Build and Unit tests
on:
push:
branches:
- 'main'
- "[0-9]+.[0-9]+.x"
pull_request:
branches:
- 'main'
- "[0-9]+.[0-9]+.x"
types: [ opened, reopened, synchronize ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Build and run Unit tests
run: mvn install --file pom.xml --no-transfer-progress -Dno-format
- name: Save Build Context
run: echo "$GITHUB_CONTEXT" > target/build-context.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Attach Build Output
uses: actions/upload-artifact@v3
with:
name: target
path: |
**/target/
!**/target/**/*.jar