-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.18 KB
/
maven-deploy.yml
File metadata and controls
40 lines (39 loc) · 1.18 KB
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
name: Maven Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_RANDOM_ROOT_PASSWORD: yes
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: mvn -DnewVersion=1.0-SNAPSHOT -B package -Dmaven.test.skip=true
- name: Test
run: mvn -B test
env:
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
MYSQL_USERNAME: test
MYSQL_PASSWORD: test
- name: Deploy to JavaWebStack Repository
run: mvn deploy -B -DnewVersion=1.0-SNAPSHOT -s build/settings.xml -Dmaven.test.skip=true
env:
DEPLOYMENT_USERNAME: ${{ secrets.DEPLOYMENT_USERNAME }}
DEPLOYMENT_PASSWORD: ${{ secrets.DEPLOYMENT_PASSWORD }}