[workflow_dispatch][2.3.x] #2187
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
# 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 Coherence Hibernate | |
run-name: ${{ github.event.head_commit.message }} [${{ github.event_name }}][${{ github.ref_name }}] | |
on: | |
schedule: | |
- cron: "0 5 * * *" | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.repository_owner == 'coherence-community' | |
strategy: | |
matrix: | |
coherence-version: [ 'LATEST', '14_1_1' ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK 11 | |
uses: actions/[email protected] | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-m2- | |
- name: Build - Hibernate 5.3.x | |
run: mvn clean install -B -Powasp -Phibernate53 | |
- name: Build - Hibernate 5.4.x | |
run: mvn clean install -B -Powasp -Phibernate54 | |
- name: Build - Hibernate 5.5.x | |
run: mvn clean install -B -Powasp -Phibernate55 | |
- name: Build with Coherence ${{ matrix.coherence-version }} | |
if: "matrix.coherence-version == '14_1_1'" | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
mvn clean install -B --settings .mvn/settings.xml -Pcoherence14_1_1 | |
- name: Build + deploy with Maven (Website + Snapshots) - ${{ matrix.coherence-version }} | |
if: "matrix.coherence-version == 'LATEST'" | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
mvn clean deploy -B -Powasp --settings .mvn/settings.xml | |
env: | |
MAVEN_GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" | |
MAVEN_SONATYPE_USERNAME: "${{secrets.MAVEN_SONATYPE_USERNAME}}" | |
MAVEN_SONATYPE_TOKEN: "${{secrets.MAVEN_SONATYPE_TOKEN}}" | |
NVD_API_KEY: "${{secrets.NVD_API_KEY}}" | |
- name: Clean Maven cache | |
run: | | |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr |