-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (38 loc) · 1.33 KB
/
maven-publish.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven (JDK 17)
# Only 'this' branch will execute this action when pushed to or a PR is created, so the 'on' is not strictly required but are added as
# an extra layer of protection to ensure the correct Java version is run
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
cache: 'maven'
- name: Set up Maven
uses: s4u/[email protected]
with:
servers: |
[{
"id": "ukf-packages",
"username": "${{ github.actor }}",
"password": "${{ secrets.GITHUB_TOKEN }}"
}]
- name: Build with Maven
run: mvn -B verify checkstyle:checkstyle --file pom.xml
- name: Upload jar artifact
uses: actions/[email protected]
with:
name: ukf-mda-snapshot
path: target/ukf-mda*.jar