Browse Source

Fix changelog output

This change repairs the changelog output generated for the release.
Multiline text requires custom handling with the new GITHUB_OUTPUT
property.
Fabian Mastenbroek 2 years ago
parent
commit
e31be78264
2 changed files with 2 additions and 8 deletions
  1. 1 4
      .github/workflows/release.yml
  2. 1 4
      .github/workflows/update.yml

+ 1 - 4
.github/workflows/release.yml

@@ -67,10 +67,7 @@ jobs:
       run: |
         echo "release=$(scripts/version.sh)" >> $GITHUB_OUTPUT
         changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
-        changelog="${changelog//'%'/'%25'}"
-        changelog="${changelog//$'\n'/'%0A'}"
-        changelog="${changelog//$'\r'/'%0D'}"
-        echo "changelog=$changelog" >> $GITHUB_OUTPUT
+        echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
     - name: Create Release
       uses: ncipollo/release-action@v1
       with:

+ 1 - 4
.github/workflows/update.yml

@@ -36,10 +36,7 @@ jobs:
         echo "version=$(scripts/version.sh -L)" >> $GITHUB_OUTPUT
         echo "full=$(scripts/version.sh)" >> $GITHUB_OUTPUT
         changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
-        changelog="${changelog//'%'/'%25'}"
-        changelog="${changelog//$'\n'/'%0A'}"
-        changelog="${changelog//$'\r'/'%0D'}"
-        echo "changelog=$changelog" >> $GITHUB_OUTPUT
+        echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
         echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
     - name: Create Pull Request
       uses: peter-evans/create-pull-request@v4