From 988305100d63aaa9787730109c4df01d5d1b5cdb Mon Sep 17 00:00:00 2001 From: Dimitrij Date: Thu, 14 Aug 2025 21:38:17 +0100 Subject: [PATCH] Update Build_mR-NB.yml Update Action --- .github/workflows/Build_mR-NB.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build_mR-NB.yml b/.github/workflows/Build_mR-NB.yml index 3e6cc3cbb..ea3459f84 100644 --- a/.github/workflows/Build_mR-NB.yml +++ b/.github/workflows/Build_mR-NB.yml @@ -63,7 +63,23 @@ jobs: echo "version=$version" >> $env:GITHUB_OUTPUT echo "build=$build" >> $env:GITHUB_OUTPUT echo "tag=$tag" >> $env:GITHUB_OUTPUT - + $version = "${{ steps.version.outputs.version }}" + $changelogPath = "$env:GITHUB_WORKSPACE\CHANGELOG.md" + $content = Get-Content $changelogPath -Raw + + # Match the section for the current version + $pattern = "## \[$version\][^\#]+" + if ($content -match $pattern) { + $section = $matches[0].Trim() + } else { + $section = "No changelog entry found for version $version." + } + + # Escape newlines for GitHub Actions output + $escaped = $section -replace "`r`n", "`n" -replace "`n", "%0A" + echo "log=$escaped" >> $env:GITHUB_OUTPUT + + - name: (08) Create Zip File shell: pwsh @@ -82,9 +98,8 @@ jobs: name: "mRemoteNG ${{ steps.version.outputs.version }} NB ${{ steps.version.outputs.build }}" files: ${{ steps.version.outputs.zipname }} body: | - Changes in this Release - - First Change - - Second Change + Changes in this Release: + ${{ steps.changelog.outputs.log }} Last Commit Message: ${{ steps.version.outputs.message }}