-
Notifications
You must be signed in to change notification settings - Fork 16
58 lines (48 loc) · 1.42 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
name: Build
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Write Maven Settings
uses: whelk-io/maven-settings-xml-action@v21
with:
servers: '[{ "id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
- name: Build with Maven
run: |
mvn --batch-mode package
- name: Archive Build Output
uses: actions/upload-artifact@v3
with:
name: svnclientadapter
path: |
base/target/*.jar
!base/target/*-sources.jar
cmdline/target/*.jar
!cmdline/target/*-sources.jar
javahl/target/*.jar
!javahl/target/*-sources.jar
svnkit/target/*.jar
!svnkit/target/*-sources.jar
- name: Publish package
if: github.event_name == 'release'
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}