-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (36 loc) · 1.06 KB
/
maven_cicd.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
name: Build and Publish to Nexus
on:
# Manually triggered workflow using the "Run workflow" button
workflow_dispatch:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
#set up the build enviroment
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Build with Maven
run: mvn -B package -DskipTests
- name: Set settings.xml
uses: s4u/[email protected]
with:
servers: |
[{
"id": "mks-repo",
"username": "${{ secrets.MAVEN_USERNAME }}",
"password": "${{ secrets.MAVEN_TOKEN }}"
},
{
"id": "mks-repo-snapshots",
"username": "${{ secrets.MAVEN_USERNAME }}",
"password": "${{ secrets.MAVEN_TOKEN }}"
}]
- name: Publish
run: mvn --batch-mode clean deploy -DskipTests