CI #2009
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
types: [ opened, synchronize, reopened, ready_for_review ] | |
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@v4 | |
- name: Prepare | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo apt-get purge -y sphinxsearch ansible 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@v4 | |
with: | |
distribution: 'zulu' | |
java-version: | | |
8 | |
11 | |
cache: 'maven' | |
- name: Build | |
run: | | |
mvn install -pl '!edi-cartridge,!edifact-cartridge' -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 |