Skip to content

Merge pull request #307 from AxonIQ/bug/download-message-suppression #239

Merge pull request #307 from AxonIQ/bug/download-message-suppression

Merge pull request #307 from AxonIQ/bug/download-message-suppression #239

Workflow file for this run

name: AxonServer Connector Java
on:
push:
branches:
- main
- master
- connector-*.*.x
jobs:
build:
name: Test and Build on JDK ${{ matrix.java-version }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- java-version: 8
sonar-enabled: false
- java-version: 11
sonar-enabled: true
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: sonatype
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Maven operation with Sonar
if: matrix.sonar-enabled
run: |
mvn -B -U -Dstyle.color=always -Possrh -Pcoverage \
clean verify \
sonar:sonar \
-Dsonar.projectKey=AxonIQ_axonserver-connector-java \
-Dsonar.organization=axoniq \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Maven operation without Sonar
if: matrix.sonar-enabled != true
run: |
mvn -B -U -Dstyle.color=always -Possrh clean verify
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Sonatype
if: success()
run: |
mvn -B -U -Dstyle.color=always deploy -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_ID }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASS }}
- name: Notify success to Slack
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
channel_id: C02P7REDBM4
status: SUCCESS
color: good
- name: Notify failure to Slack
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
channel_id: C02P7REDBM4
status: FAILED
color: danger