From 76a2e727d2cb174696203c20e26a87d16b7ce4e2 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 12 Nov 2024 15:21:40 +0900 Subject: [PATCH] Workflow: temporary disabled generate-body step --- .github/workflows/build_release.yml | 100 ++++++++++++++-------------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index b1e931a7..8e66bd6d 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -160,57 +160,59 @@ jobs: - name: Generate release body text id: generate-body run: | - # Enable debugging - set -x + # # Enable debugging + # set -x + + # # Initialize the release body + # RELEASE_BODY="# Release Notes\n" + # RELEASE_BODY+="This release is based on the commit: RetroDECK/RetroDECK@c8bd579ad4d0922ba7ab1f5c122cc782ff6adc66.\n" + # RELEASE_BODY+="On branch [cooker](https://github.com/RetroDECK/RetroDECK/tree/cooker).\n\n" + # RELEASE_BODY+="## Commits since last release\n" + # RELEASE_BODY+="- RELEASE NOTES: fixed body\n\n" + + # # Define the XML file path + # xml_file="./net.retrodeck.retrodeck.appdata.xml" + + # # Check if the XML file exists + # if [[ ! -f "$xml_file" ]]; then + # echo "Error: XML file not found: $xml_file" + # exit 1 + # fi + + # # Extract the raw description content + # raw_description=$(xmlstarlet sel -t -m "/component/releases/release[1]/description/*" -c "." -n "$xml_file" 2>/dev/null) + + # # Check if xmlstarlet extraction was successful + # if [[ $? -ne 0 ]]; then + # echo "Error: Failed to extract description content using xmlstarlet" + # exit 1 + # fi + + # # Convert

tags to markdown headers using sed + # markdown_description=$(echo "$raw_description" | sed -e 's|

|\n### |g' -e 's|

||g') + + # # Convert
  • tags to bullet points and trim spaces + # markdown_description=$(echo "$markdown_description" | sed -e 's|||g' -e 's|
  • |- |g' -e 's|
  • ||g' | awk '{$1=$1;print}') + + # # Remove any remaining XML tags + # markdown_description=$(echo "$markdown_description" | sed -e 's/<[^>]*>//g') + + # # Debug: Print the markdown description + # echo "Markdown Description:" + # echo "$markdown_description" + + # # Append markdown content with proper formatting + # RELEASE_BODY+="$markdown_description\n" + + # # Output the release body for GitHub Actions + # { + # printf "release_body<> "$GITHUB_OUTPUT" + + # # Disable debugging + # set +x - # Initialize the release body RELEASE_BODY="# Release Notes\n" - RELEASE_BODY+="This release is based on the commit: RetroDECK/RetroDECK@c8bd579ad4d0922ba7ab1f5c122cc782ff6adc66.\n" - RELEASE_BODY+="On branch [cooker](https://github.com/RetroDECK/RetroDECK/tree/cooker).\n\n" - RELEASE_BODY+="## Commits since last release\n" - RELEASE_BODY+="- RELEASE NOTES: fixed body\n\n" - - # Define the XML file path - xml_file="./net.retrodeck.retrodeck.appdata.xml" - - # Check if the XML file exists - if [[ ! -f "$xml_file" ]]; then - echo "Error: XML file not found: $xml_file" - exit 1 - fi - - # Extract the raw description content - raw_description=$(xmlstarlet sel -t -m "/component/releases/release[1]/description/*" -c "." -n "$xml_file" 2>/dev/null) - - # Check if xmlstarlet extraction was successful - if [[ $? -ne 0 ]]; then - echo "Error: Failed to extract description content using xmlstarlet" - exit 1 - fi - - # Convert

    tags to markdown headers using sed - markdown_description=$(echo "$raw_description" | sed -e 's|

    |\n### |g' -e 's|

    ||g') - - # Convert
  • tags to bullet points and trim spaces - markdown_description=$(echo "$markdown_description" | sed -e 's|
      ||g' -e 's|
    ||g' -e 's|
  • |- |g' -e 's|
  • ||g' | awk '{$1=$1;print}') - - # Remove any remaining XML tags - markdown_description=$(echo "$markdown_description" | sed -e 's/<[^>]*>//g') - - # Debug: Print the markdown description - echo "Markdown Description:" - echo "$markdown_description" - - # Append markdown content with proper formatting - RELEASE_BODY+="$markdown_description\n" - - # Output the release body for GitHub Actions - { - printf "release_body<> "$GITHUB_OUTPUT" - - # Disable debugging - set +x - name: "Build flatpak: download only" run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"