Update to Kotlin 1.8.20, KSP 1.0.11 & kotlinPoet 1.13.1, which fixes #34 #69
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 and publish a snapshot | |
on: | |
push: | |
branches: | |
- master | |
- 'snapshot/*' | |
- 'kotlin-*' | |
paths-ignore: | |
- '**.md' | |
- '**.adoc' | |
- '**/.gitignore' | |
- './github/**' | |
- '!./github/workflow/snapshot.yml' | |
env: | |
SONATYPE_USERNAME: ${{ secrets.sonatype_username }} | |
SONATYPE_PASSWORD: ${{ secrets.sonatype_password }} | |
jobs: | |
build-upload: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Cached Konan | |
uses: actions/cache@v2 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-konan- | |
- name: Cached Gradle | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
# Host only for MacOS / Windows | |
- name: Check (macos / windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: ./gradlew --stacktrace hostOnlyTest | |
shell: bash | |
- name: Upload (macos / windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: ./gradlew --stacktrace hostOnlyPublish -PgitRef=${{ github.ref }} -Psnapshot=true | |
shell: bash | |
# Linux / JVM / JS | |
- name: Check (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew --stacktrace check | |
shell: bash | |
- name: Publish To Maven Local (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew --stacktrace publishToMavenLocal | |
shell: bash | |
- name: Check plugin with JVM JUnit4 (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: tests-projects/tests-jvm-junit4 | |
run: ./gradlew --stacktrace check | |
shell: bash | |
- name: Check plugin with JVM JUnit5 (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: tests-projects/tests-jvm-junit5 | |
run: ./gradlew --stacktrace check | |
shell: bash | |
- name: Check plugin with Android (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: tests-projects/tests-android | |
run: ./gradlew --stacktrace check | |
shell: bash | |
- name: Upload (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew --stacktrace publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true | |
shell: bash |