forked from izpack/izpack
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.84 KB
/
maven.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: CI
on:
- push
- pull_request
- workflow_dispatch
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
jdk: ['17']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: "${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}"
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: ./mvnw -B -U test-compile
# run: ./mvnw -B -U verify
- name: Running Maven GUI tests
run: |
sudo apt-get install fluxbox
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
fluxbox &> ~/fluxbox.log &
./mvnw -B -pl '!izpack-dist' test-compile
# ./mvnw -B verify -Pwith-gui-tests
deploy:
if: contains( github.ref, 'master')
needs: build
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
gpg-private-key: "${{ secrets.GPG_SIGNING_KEY }}"
overwrite-settings: false
- name: Deploy snapshot artifacts
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./mvnw deploy --settings .github/workflows/settings.xml -DskipTests=true