-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (49 loc) · 1.61 KB
/
maven-verify.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
maven-build-and-verify:
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - name: Cache local Maven repository
# uses: actions/cache@v2
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-
- uses: actions/setup-java@v2
name: Set up JDK 21
with:
java-version: '21'
distribution: 'adopt'
# - name: Set up Apache Maven Central
# uses: actions/setup-java@v2
# with: # running setup-java again overwrites the settings.xml
# java-version: '17'
# distribution: 'adopt'
- uses: s4u/[email protected]
name: Set settings.xml
with:
servers: |
[{
"id": "backbase",
"username": "${{ secrets.REPO_USERNAME }}",
"password": "${{ secrets.REPO_PASSWORD }}"
}]
- run: mvn --batch-mode --update-snapshots verify
name: Build and test project
- run: mkdir staging && cp services/product/target/*.jar staging
name: Move and upload the jar
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging