-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (44 loc) · 1.48 KB
/
deploy.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
name: Build and Deploy
on:
push:
branches: [ main ]
release:
types: [ created ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 8.0.232
- 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-
- name: Build and Test
run: mvn --batch-mode --update-snapshots clean package -DskipTests
- name: Set settings.xml
uses: s4u/[email protected]
with:
servers: |
[{
"id": "uwdigi-repo-central",
"username": "${{ secrets.MAVEN_REPO_USERNAME }}",
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}"
},
{
"id": "uwdigi-repo-snapshots",
"username": "${{ secrets.MAVEN_REPO_USERNAME }}",
"password": "${{ secrets.MAVEN_REPO_PASSWORD }}"
}]
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }}
- name: Deploy
run: mvn --batch-mode clean deploy -DskipTests
if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'IsantePlus' }}