From 455495f00c2ba748c6bfd94cec8435d8d3276284 Mon Sep 17 00:00:00 2001 From: Lev Chelyadinov Date: Fri, 22 Jan 2021 18:40:36 +0300 Subject: [PATCH] Exclude the line containing the version from the release body And fix an embarassing case of undefined variables --- .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 ba1694835..48f47c04d 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -39,7 +39,7 @@ jobs: 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'); + return changelog.slice(start + 1, end).join('\n').trim(); - name: Create a release 🔖 uses: actions/create-release@v1