From f19e5c00a96f46519fb747cbe0293a6960fc15ae Mon Sep 17 00:00:00 2001 From: dennis Date: Sun, 21 Jul 2024 15:09:40 +0200 Subject: [PATCH] let pipeline convert md to html --- .github/workflows/release.yml | 20 ++++++++++++++------ build.gradle.kts | 8 +++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a27e5f2..e5b7ee7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,17 +36,25 @@ jobs: with: gradle-home-cache-cleanup: true - - name: Patch Plugin XML - env: - PLUGIN_VERSION: ${{ github.event.release.tag_name }} - CHANGELOG: ${{ github.event.release.body }} - run: ./gradlew patchPluginXml + - name: Convert Markdown to HTML + id: convert-markdown + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y pandoc + MARKDOWN="${{ github.event.release.body }}" + HTML=$(echo "$MARKDOWN" | pandoc -f markdown -t html) + { + echo "html_output<> $GITHUB_OUTPUT # Publish the plugin to JetBrains Marketplace - name: Publish Plugin env: PLUGIN_VERSION: ${{ github.event.release.tag_name }} - CHANGELOG: ${{ github.event.release.body }} + CHANGELOG: ${{ github.step.convert-markdown.outputs.html_output }} PUBLISH_TOKEN: ${{ secrets.PLUGIN_REPOSITORY_TOKEN }} run: ./gradlew publishPlugin diff --git a/build.gradle.kts b/build.gradle.kts index ebc4ff4..a20b7d8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -60,9 +60,11 @@ tasks { version.set( environment("PLUGIN_VERSION").getOrElse("0.0.0") ) - changeNotes.set( - environment("CHANGELOG").getOrElse("") - ) + val cn = environment("CHANGELOG").getOrElse("") + if (cn.isNotBlank()) { + changeNotes.set(cn) + } + } publishPlugin {