Skip to content

Merge pull request #11 from AxonIQ/dependabot/maven/org.axonframework… #16

Merge pull request #11 from AxonIQ/dependabot/maven/org.axonframework…

Merge pull request #11 from AxonIQ/dependabot/maven/org.axonframework… #16

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
name: Test and Build on JDK ${{ matrix.java-version }}
runs-on: ubuntu-latest
continue-on-error: true # do not fail the whole job if one of the steps fails
strategy:
matrix:
include:
- java-version: 8
sonar-enabled: false
deploy-enabled: true
- java-version: 11
sonar-enabled: false
deploy-enabled: false
- java-version: 17
sonar-enabled: true
deploy-enabled: false
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: "maven"
server-id: axoniq-nexus
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Regular Build
if: ${{ !matrix.sonar-enabled }}
run: |
./mvnw -B -U -Dstyle.color=always -Possrh clean verify
- name: Build with Coverage reports
if: matrix.sonar-enabled
run: |
./mvnw -B -U -Dstyle.color=always -Dcoverage clean verify
- name: Sonar Analysis
if: matrix.sonar-enabled
run: |
./mvnw -B -Dstyle.color=always sonar:sonar \
-Dsonar.projectKey=AxonIQ_console-framework-client \
-Dsonar.organization=axoniq \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Sonatype
if: matrix.deploy-enabled
run: |
./mvnw -B -U -Dstyle.color=always -Possrh deploy -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.DEVBOT_GITHUB_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.DEVBOT_GITHUB_TOKEN }}