Skip to content

Publish

Publish #127

Workflow file for this run

name: Publish
on:
workflow_run:
workflows: [ Build ]
branches: [ master ]
types: [ completed ]
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}"
cancel-in-progress: false
jobs:
maven-publish:
runs-on: macos-latest # macOS supports building all Kotlin targets
if: ${{ github.event.workflow_run.conclusion == 'success' }} # only publish if the 'Build' workflow passed
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v4
with:
path: |
~/.konan/**/*
key: kotlin-konan-${{ runner.os }}
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
# Maven Central _really_ doesn't like parallel uploads, so disable parallelization
arguments: publish --no-configuration-cache --no-parallel
env:
ORG_GRADLE_PROJECT_MARYK_OSSRHUSERNAME: ${{secrets.MARYK_OSSRHUSERNAME}}
ORG_GRADLE_PROJECT_MARYK_OSSRHPASSWORD: ${{secrets.MARYK_OSSRHPASSWORD}}
ORG_GRADLE_PROJECT_MARYK_SIGNING_KEY: ${{secrets.MARYK_SIGNING_KEY}}
ORG_GRADLE_PROJECT_MARYK_SIGNING_PASSWORD: ${{secrets.MARYK_SIGNING_PASSWORD}}