Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit f19e5c0

Browse files
committed
let pipeline convert md to html
1 parent fa88d47 commit f19e5c0

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.github/workflows/release.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,25 @@ jobs:
3636
with:
3737
gradle-home-cache-cleanup: true
3838

39-
- name: Patch Plugin XML
40-
env:
41-
PLUGIN_VERSION: ${{ github.event.release.tag_name }}
42-
CHANGELOG: ${{ github.event.release.body }}
43-
run: ./gradlew patchPluginXml
39+
- name: Convert Markdown to HTML
40+
id: convert-markdown
41+
shell: bash
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y pandoc
45+
MARKDOWN="${{ github.event.release.body }}"
46+
HTML=$(echo "$MARKDOWN" | pandoc -f markdown -t html)
47+
{
48+
echo "html_output<<EOF"
49+
echo "${HTML}"
50+
echo EOF
51+
} >> $GITHUB_OUTPUT
4452
4553
# Publish the plugin to JetBrains Marketplace
4654
- name: Publish Plugin
4755
env:
4856
PLUGIN_VERSION: ${{ github.event.release.tag_name }}
49-
CHANGELOG: ${{ github.event.release.body }}
57+
CHANGELOG: ${{ github.step.convert-markdown.outputs.html_output }}
5058
PUBLISH_TOKEN: ${{ secrets.PLUGIN_REPOSITORY_TOKEN }}
5159
run: ./gradlew publishPlugin
5260

build.gradle.kts

+5-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ tasks {
6060
version.set(
6161
environment("PLUGIN_VERSION").getOrElse("0.0.0")
6262
)
63-
changeNotes.set(
64-
environment("CHANGELOG").getOrElse("")
65-
)
63+
val cn = environment("CHANGELOG").getOrElse("")
64+
if (cn.isNotBlank()) {
65+
changeNotes.set(cn)
66+
}
67+
6668
}
6769

6870
publishPlugin {

0 commit comments

Comments
 (0)