From bbb22121de32f7d134810d8f75c3d72931907fc1 Mon Sep 17 00:00:00 2001 From: Lev Chelyadinov Date: Fri, 22 Jan 2021 18:31:30 +0300 Subject: [PATCH] Use the encoding parameter to get the file contents as a string --- .github/workflows/auto-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 0bf95ad77..ba1694835 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -36,7 +36,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: - const changelog = require('fs').readFileSync('CHANGELOG.md').split('\n'); + const changelog = require('fs').readFileSync('CHANGELOG.md', { encoding: 'utf-8' }).split('\n'); const start = changelog.findIndex(line => line.startsWith('## ')); const end = changelog.findIndex((line, index) => line.startsWith('## ') && index > start); return changelog.slice(startIndex, endIndex).join('\n');