From 9959adbd313e0190b3d9f3152ffac97276e2571e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 12 Nov 2024 12:00:31 +0900 Subject: [PATCH] Workflow: enhancing release notes + fix --- .github/workflows/build_release.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index d73bea0c..608c2486 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -165,8 +165,26 @@ jobs: RELEASE_BODY+="On branch [${{ env.BRANCH_NAME }}](https://github.com/RetroDECK/RetroDECK/tree/${{ env.BRANCH_NAME }}).\n\n" RELEASE_BODY+="## Commits since last release\n" RELEASE_BODY+="${{ steps.get-commits.outputs.commits }}\n\n" + RELEASE_BODY+="## In this release:\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) + + # 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) + + # Construct the full release body + RELEASE_BODY="# Release Notes\nVersion: $LATEST_RELEASE\n\n$DESCRIPTION" + + # Output the release body for GitHub Actions echo "release_body=$RELEASE_BODY" >> $GITHUB_OUTPUT + - name: "Build flatpak: download only" + run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh" + # Sometimes flatpak download fails, in this case it tries a second time - name: "Build flatpak: download only (retry)" if: steps.flatpak-download.outcome == 'failure' @@ -178,9 +196,6 @@ jobs: "${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" "${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh" - - name: Build flatpak - run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh" - - name: Create Bundle run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"