Draft: moving forward to Kotlin 1.9.0 and WASM #270
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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3 | |
- name: Cached Konan | |
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-konan- | |
- name: Cached Gradle | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 #v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc #v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
# Host only for MacOS / Windows | |
- name: Check (macos / windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: ./gradlew hostOnlyTest | |
shell: bash | |
- name: Check Android | |
if: matrix.os == 'macOS-latest' | |
uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 #v2 | |
with: | |
api-level: 29 | |
ndk: 21.3.6528147 | |
cmake: 3.10.2.4988404 | |
script: ./gradlew connectedCheck | |
- name: Upload (macos / windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: ./gradlew hostOnlyPublish -PgitRef=${{ github.ref }} -Psnapshot=true | |
shell: bash | |
# Linux / JVM / JS | |
- name: Check (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew check | |
shell: bash | |
- name: Upload (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true | |
shell: bash |