[maven-release-plugin] prepare for next development iteration #332
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: Main - Axon Server 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 | |
deploy-enabled: true | |
- java-version: 11 | |
sonar-enabled: false | |
deploy-enabled: false | |
- java-version: 17 | |
sonar-enabled: true | |
deploy-enabled: false | |
- java-version: 21 | |
sonar-enabled: false | |
deploy-enabled: false | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- 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: Build and Test with Sonar Analysis | |
if: matrix.sonar-enabled | |
run: | | |
./mvnw -B -U -Dstyle.color=always -Possrh -Pcoverage clean verify \ | |
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ | |
-Dsonar.projectKey=AxonIQ_axonserver-connector-java | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.CONNECTOR_SONAR_TOKEN }} | |
- name: Build and Test without Sonar Analysis | |
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() && matrix.deploy-enabled | |
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 }} |