Publish Release #23
Workflow file for this run
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: Publish Release | |
on: | |
push: | |
tags: | |
- '**' | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | |
jobs: | |
create-gh-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Extract release notes | |
id: release_notes | |
uses: ffurrer2/extract-release-notes@v2 | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: ${{ steps.release_notes.outputs.release_notes }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
needs: create-gh-release | |
strategy: | |
matrix: | |
os: [ macos-14 ] | |
# run sequentially to avoid conflicts for closeAndReleaseRepository | |
# max-parallel: 1 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-home-cache-cleanup: true | |
- name: Cache konan | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.konan/cache | |
~/.konan/dependencies | |
~/.konan/kotlin-native-macos* | |
~/.konan/kotlin-native-mingw* | |
~/.konan/kotlin-native-windows* | |
~/.konan/kotlin-native-linux* | |
~/.konan/kotlin-native-prebuilt-macos* | |
~/.konan/kotlin-native-prebuilt-mingw* | |
~/.konan/kotlin-native-prebuilt-windows* | |
~/.konan/kotlin-native-prebuilt-linux* | |
key: ${{ matrix.os }}-konan-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ matrix.os }}-konan- | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build release | |
run: ./gradlew assemble | |
- name: Publish release | |
run: ./gradlew publish --stacktrace | |
if: matrix.os == 'macos-14' | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_SIGNING_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_SIGNING_PASSWORD }} | |
# - name: Publish release (Windows) | |
# run: ./gradlew build publishMingwX64PublicationToMavenCentralRepository --no-parallel --stacktrace | |
# if: matrix.os == 'windows-latest' | |
# env: | |
# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
# ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_SIGNING_PRIVATE_KEY }} | |
# ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_SIGNING_PASSWORD }} | |
#- name: Publish release | |
# run: ./gradlew closeAndReleaseRepository --no-parallel | |
# env: | |
# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
- name: Generate docs | |
run: ./gradlew dokkaHtml --no-parallel --stacktrace | |
- name: Deploy docs 🚀 to website | |
if: ${{ matrix.os == 'macos-14' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build/dokka/html # The folder the action should deploy. | |
target-folder: docs/1.x/ | |
clean: true |