Switch test reports to OSS flow #214
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.OS }} | |
strategy: | |
fail-fast: false | |
matrix: | |
OS: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
steps: | |
- name: Set Git to preserve original line endings | |
run: | | |
git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test-results-${{ matrix.OS }} | |
path: "**/test-results/**/*.xml" | |
- name: Show version | |
run: ./gradlew :printVersion | |
- name: Publish snapshot | |
if: ${{ github.event_name == 'push' && matrix.OS == 'ubuntu-latest' }} | |
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} |