Skip to content

Split master workflow into test and publish stages #3

Split master workflow into test and publish stages

Split master workflow into test and publish stages #3

Workflow file for this run

---
name: master
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
branches:
- master
concurrency:
group: '${{ github.workflow }}'
# don't leave snapshot builds in a half-done state
cancel-in-progress: false
jobs:
validate-api:
name: Validate API
if: github.repository == 'serpro69/kotlin-faker'
uses: ./.github/workflows/run_gradle.yml
secrets: inherit
with:
runs-on: ubuntu-latest
ref: master
task: apiCheck
test:
name: Run tests
needs: validate-api
uses: ./.github/workflows/run_gradle.yml
secrets: inherit
with:
runs-on: ubuntu-latest
ref: master
task: >
-P"kotlinFaker_enableKotlinJs=true"
-P"kotlinFaker_enableKotlinNative=true"
check
publish:
name: Publish snapshots
needs: test
strategy:
matrix:
include:
# KMP
- os: ubuntu-latest
args: -P"kotlinFaker_enabledPublicationNamePrefixes=KotlinMultiplatform"
# JVM
- os: ubuntu-latest
args: -P"kotlinFaker_enabledPublicationNamePrefixes=jvm"
uses: ./.github/workflows/run_gradle.yml
secrets: inherit
with:
ref: master
task: >
-P"kotlinFaker_enableKotlinJs=true"
-P"kotlinFaker_enableKotlinNative=true"
${{ matrix.args }}
--no-configuration-cache
publishToAppropriateCentralRepository
runs-on: ${{ matrix.os }}