Workflow: enhancing release notes + fix

This commit is contained in:
XargonWan 2024-11-12 12:00:31 +09:00
parent fb6fb139c0
commit 9959adbd31

View file

@ -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"