57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Snapshot
|
|
|
|
"on":
|
|
workflow_dispatch: {}
|
|
push: {}
|
|
|
|
jobs:
|
|
|
|
lint-yaml:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ibiqlik/action-yamllint@v3
|
|
with:
|
|
format: colored
|
|
strict: true
|
|
|
|
lint-markdown:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker://avtodev/markdown-lint:v1
|
|
with:
|
|
args: /github/workspace
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- lint-markdown
|
|
- lint-yaml
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-java@v2
|
|
with:
|
|
distribution: temurin
|
|
java-version: 11
|
|
cache: maven
|
|
server-id: sonatype-nexus
|
|
server-username: SERVER_USERNAME
|
|
server-password: SERVER_PASSWORD
|
|
- run: mvn -B dependency:go-offline -q
|
|
- run: mvn -B verify
|
|
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/3.x'
|
|
- run: mvn -B deploy -Poss
|
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/3.x'
|
|
env:
|
|
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
|
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
|
- uses: dorny/test-reporter@v1
|
|
if: failure()
|
|
with:
|
|
name: surefire
|
|
path: '*/target/surefire-reports/*.xml'
|
|
reporter: java-junit
|
|
list-suites: failed
|
|
list-tests: failed
|
|
fail-on-error: false
|