diff --git a/.github/workflows/build_retrodeck.yml b/.github/workflows/build_retrodeck.yml index 27ac60f4..f004231a 100644 --- a/.github/workflows/build_retrodeck.yml +++ b/.github/workflows/build_retrodeck.yml @@ -179,8 +179,12 @@ jobs: echo "Commits since $LATEST_TAG:" echo "$COMMITS" - # Export the commits list to the GitHub environment - echo "COMMITS=$COMMITS" >> $GITHUB_ENV + # Write the commits list to a file + echo "$COMMITS" > commits_list.txt + + # Set the commits list as an environment variable + echo "COMMITS_FILE=commits_list.txt" >> $GITHUB_ENV + # - name: Extract XML Description # uses: Mudlet/xmlstarlet-action@master @@ -194,14 +198,28 @@ jobs: run: | # Initialize the release body text RELEASE_BODY="# Release Notes\n" - RELEASE_BODY+="This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}." - RELEASE_BODY+="On branch [${{env.BRANCH_NAME}}](https://repo.retrodeck.net/RetroDECK/RetroDECK/src/branch/${{env.BRANCH_NAME}})." + RELEASE_BODY+="This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{ github.sha }}.\n" + RELEASE_BODY+="On branch [${{ env.BRANCH_NAME }}](https://repo.retrodeck.net/RetroDECK/RetroDECK/src/branch/${{ env.BRANCH_NAME }}).\n" RELEASE_BODY+="## Commits since last release\n" - RELEASE_BODY+="$COMMITS\n\n" - + + # Append commits from the file to the release body + if [ -f "${{ env.COMMITS_FILE }}" ]; then + COMMITS=$(cat "${{ env.COMMITS_FILE }}") + RELEASE_BODY+="$COMMITS\n\n" + else + echo "[ERROR] Commits file not found: ${{ env.COMMITS_FILE }}" + RELEASE_BODY+="[ERROR] Commits file not found" + fi + + # Debug: Print the release body so far + echo "[DEBUG] RELEASE_BODY:" + echo "$RELEASE_BODY" + + # Process raw description (if needed) #raw_description="${{ steps.extract-description.outputs.result }}" - + # Convert
tags to markdown headers using sed + # raw_description="${{ steps.extract-description.outputs.result }}" markdown_description=$(echo "$raw_description" | sed -e 's|
|\n### |g' -e 's|
||g') # Convert