Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Add end-of-life notice to the README (#474) #50

Add end-of-life notice to the README (#474)

Add end-of-life notice to the README (#474) #50

Workflow file for this run

name: Build and Publish
on:
pull_request:
push:
branches:
- master
jobs:
cleanup-run:
name: Cleanup previous run in PRs
runs-on: ubuntu-latest
steps:
- name: Abort previous action run (branch != master)
if: endsWith(github.ref, 'master') == false
uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
strategy:
fail-fast: false
matrix:
jdk: [ 8, 11, 15 ]
name: Build and Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- name: Prepare dependencies
run: |
mvn install:install-file \
-Dfile=lib/spring-restdocs-core-2.0.6.RELEASE-test-fixtures.jar \
-DgroupId=org.springframework.restdocs \
-DartifactId=spring-restdocs-core \
-Dversion=2.0.6.RELEASE \
-Dpackaging=jar \
-Dclassifier=test
mvn install:install-file \
-Dfile=lib/dokka-core-0.10.1-tests.jar \
-DgroupId=org.jetbrains.dokka \
-DartifactId=dokka-core -Dversion=0.10.1 \
-Dpackaging=jar \
-Dclassifier=test
- name: Build and Run Tests - Core
run: |
mvn install -B -V -fae
- name: Build and Run Tests - Samples
run: |
cd samples
mvn install -B -V -fae
- name: Build and Run Tests - Gradle java-webmvc
run: |
cd samples/java-webmvc
./gradlew check
- name: Build and Run Tests - Gradle kotlin-webmvc (JDK 8 only)
if: matrix.jdk == '8'
run: |
cd samples/kotlin-webmvc
./gradlew check
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Test Report (${{ matrix.jdk }})
- name: Set up Sonatype
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
server-id: ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Sign and publish core libs (master + JDK 8 only)
if: matrix.jdk == '8' && endsWith(github.ref, 'master')
run: |
mvn deploy -DskipTests=true -B -V
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Sign and publish jdk9 doclet (master + JDK 11 only)
if: matrix.jdk == '11' && endsWith(github.ref, 'master')
run: |
cd spring-auto-restdocs-json-doclet-jdk9
mvn deploy -DskipTests=true -B -V
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}