forked from Devskiller/jfairy
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.1 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Java and Maven - setup settings.xml
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
server-id: github
cache: 'maven'
# need to be after actions/setup-java@v4
# and repeat github server id since setting.xml is replaced
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v21
with:
repositories: >
[
{
"id": "bar",
"name": "Bonita Artifact Repository",
"url": "https://bonitasoft.jfrog.io/artifactory/releases",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
plugin_repositories: >
[
{
"id": "bar",
"name": "Bonita Artifact Repository",
"url": "https://bonitasoft.jfrog.io/artifactory/releases",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
servers: >
[
{
"id": "bar",
"username": "${{ secrets.JFROG_USER }}",
"password": "${{ secrets.JFROG_TOKEN }}"
},
{
"id": "github",
"username": "${{ secrets.MVN_USER }}",
"password": "${{ secrets.MVN_TOKEN }}"
}
]
- name: Build and Test
run: ./mvnw clean verify
- name: Publish to Github Package
run: ./mvnw --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}