Skip to content

Commit

Permalink
let pipeline convert md to html
Browse files Browse the repository at this point in the history
  • Loading branch information
janthoXO committed Jul 21, 2024
1 parent fa88d47 commit f19e5c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF"
echo "${HTML}"
echo EOF
} >> $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

Expand Down
8 changes: 5 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f19e5c0

Please sign in to comment.