-
Notifications
You must be signed in to change notification settings - Fork 14
47 lines (45 loc) · 1.69 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
strategy:
matrix:
java: [ '8', '11' ]
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo apt-get purge -y sphinxsearch ansible google-cloud-sdk php* apache2 kubectl nginx p7zip p7zip-full p7zip-rar podman buildah skopeo ruby-full postgresql* gfortran* mysql* python* subversion mercurial firefox google-chrome-stable
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: |
8
11
cache: 'maven'
- name: Build
run: |
mvn install -pl '!edi-cartridge,!edifact-cartridge' -T 1C -U
export JAVA_HOME=$JAVA_HOME_${{ matrix.java }}_X64
mvn install -pl edi-cartridge,edifact-cartridge -U
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.java == '11'
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust
mvn deploy -T 1C --settings .mvn/settings.xml -Dgpg.skip=false -DskipTests=true -Dmaven.javadoc.skip=false