Merge pull request #219 from fraktalio/renovate/gradle-8.x #198
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 with Gradle - Test, Build and Publish | |
# Trigger the workflow on push, | |
# but only for the main branch | |
on: | |
push: | |
branches: [ main ] | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
GPG_PRIVATE_PASSWORD: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ 'macos-11', 'ubuntu-latest', 'windows-latest' ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java | |
uses: actions/setup-java@v3.12.0 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
check-latest: true | |
- name: Publish JVM, JS and MacOS versions | |
uses: gradle/gradle-build-action@v2.7.0 | |
if: matrix.os == 'macos-11' | |
with: | |
cache-disabled: true | |
arguments: --full-stacktrace build publishAllPublicationToOssrhRepository | |
- name: Publish Linux version | |
uses: gradle/gradle-build-action@v2.7.0 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
cache-disabled: true | |
arguments: --full-stacktrace linuxX64Test publishLinuxX64PublicationToOssrhRepository | |
- name: Publish Windows version | |
uses: gradle/gradle-build-action@v2.7.0 | |
if: matrix.os == 'windows-latest' | |
with: | |
cache-disabled: true | |
arguments: --full-stacktrace mingwX64Test publishMingwX64PublicationToOssrhRepository | |
- name: Stop Gradle daemons | |
run: ./gradlew --stop |