Kotlin 1.9.21 #98
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' | |
jobs: | |
build-upload: | |
runs-on: ${{ matrix.os }} | |
env: | |
SONATYPE_USERNAME: ${{ secrets.sonatype_username }} | |
SONATYPE_PASSWORD: ${{ secrets.sonatype_password }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- name: Setup | |
uses: kosi-libs/kodein-internal-github-actions/setup@main | |
# Host only for MacOS / Windows | |
- name: Check (macos / windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: ./gradlew hostOnlyTest | |
shell: bash | |
- 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 |