build REL-8.3-SNAPSHOT ('Another one') #3270
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: build | |
run-name: build ${{ github.ref_name }} ('${{ github.event.head_commit.message }}') | |
on: | |
push: | |
branches: [main, "REL-*"] | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest] | |
java: [ 17 ] | |
# also check (once) on latest LTE (not 17 anymore) | |
include: | |
- os: ubuntu-latest | |
java: 21 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cancel previous Action | |
uses: styfle/cancel-workflow-action@0.12.1 | |
continue-on-error: true # for act | |
- uses: actions/checkout@v4.1.1 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
cache: maven | |
server-id: vpro-ossrh | |
server-username: SONATYPE_USERNAME | |
server-password: SONATYPE_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | |
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE | |
- name: Build and deploy with Maven (Linux, java 17) | |
run: mvn -ntp -B -P"deploy,ossrh,npm" -U -fae deploy | |
if: runner.os == 'Linux' && matrix.java == '17' | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }} | |
- name: Show dependency updates | |
run: mvn -ntp versions:display-dependency-updates | |
if: runner.os == 'Linux' && matrix.java == '17' | |
- name: Build with Maven (Other os) | |
run: mvn -ntp -B -U -fae package | |
if: "! (runner.os == 'Linux' && matrix.java == '17')" | |
continue-on-error: true | |
- name: Publish to codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
verbose: true | |
files: "**/target/surefire-reports/*.xml" | |
if: github.ref == 'refs/heads/main' && runner.os == 'Linux' | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2.14.0 | |
if: always() && runner.os == 'Linux' | |
with: | |
junit_files: "**/target/surefire-reports/*.xml" | |
check_name: Tests results java ${{ matrix.java }}, os ${{ matrix.os }} | |
- name: Publish Unit Test Results (Windows) | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2.14.0 | |
if: always() && runner.os == 'Windows' | |
with: | |
junit_files: "**/target/surefire-reports/*.xml" | |
check_name: Tests results java ${{ matrix.java }}, os ${{ matrix.os }} | |