Skip to content

Release

Release #9

Workflow file for this run

name: Release
on:
workflow_dispatch: {}
push:
tags:
- 'v*'
concurrency:
group: "release"
cancel-in-progress: false
jobs:
gradle:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version-file: .github/workflows/.ci-java-version
- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v3
with:
path: |
~/.konan/**/*
key: kotlin-konan-${{ runner.os }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Publish the shared and macOS artifacts
if: matrix.os == 'macOS-latest'
run: ./gradlew :publishAllPublicationsToSonatypeRepository :closeSonatypeStagingRepository -x :publishMingwX64PublicationToSonatypeRepository -x :publishLinuxX64PublicationToSonatypeRepository --no-parallel
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}}
ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.SIGNING_PASSWORD}}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.SONATYPE_USERNAME}}
ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.SONATYPE_PASSWORD}}
- name: Publish the windows artifact
if: matrix.os == 'windows-latest'
run: ./gradlew :publishMingwX64PublicationToSonatypeRepository :closeSonatypeStagingRepository --no-parallel
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}}
ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.SIGNING_PASSWORD}}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.SONATYPE_USERNAME}}
ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.SONATYPE_PASSWORD}}
- name: Publish the linux artifact
if: matrix.os == 'ubuntu-latest'
run: ./gradlew :publishLinuxX64PublicationToSonatypeRepository :closeSonatypeStagingRepository --no-parallel
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{secrets.SIGNING_KEY_ID}}
ORG_GRADLE_PROJECT_signingKey: ${{secrets.SIGNING_KEY}}
ORG_GRADLE_PROJECT_signingPassword: ${{secrets.SIGNING_PASSWORD}}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{secrets.SONATYPE_USERNAME}}
ORG_GRADLE_PROJECT_sonatypePassword: ${{secrets.SONATYPE_PASSWORD}}