diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index c875b232..2600460d 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -166,19 +166,26 @@ jobs: RELEASE_BODY+="## Commits since last release\n" RELEASE_BODY+="${{ steps.get-commits.outputs.commits }}\n\n" - # # Extract the latest release version and date - # LATEST_RELEASE=$(xmlstarlet sel -t -m "//release[1]" -v "@version" -o " (" -v "@date" -o ")" -n net.retrodeck.retrodeck.appdata.xml) + # Define the XML file path + xml_file="./net.retrodeck.retrodeck.appdata.xml" - # # Extract and format the description content - # DESCRIPTION=$(xmlstarlet sel -t -m "//release[1]/description/*" \ - # -i "self::p" -o "\n### " -v "." -o "\n" \ - # -i "self::ul/li" -o "- " -v "." -o "\n" \ - # net.retrodeck.retrodeck.appdata.xml) + # Extract the raw description content + raw_description=$(xmlstarlet sel -t -m "/component/releases/release[1]/description/*" -c "." -n "$xml_file") - # RELEASE_BODY+="# Release Notes\nVersion: $LATEST_RELEASE\n\n$DESCRIPTION" + # Convert
tags to markdown headers using sed and place headers correctly + markdown_description=$(echo "$raw_description" | sed -e 's|
|\n### |g' -e 's|
||g') - # Output the release body for GitHub Actions - echo "release_body=$RELEASE_BODY" >> $GITHUB_OUTPUT + # Convert