chore: add changelog to release body

This commit is contained in:
Esteban Abaroa
2023-09-18 00:08:27 +00:00
parent 9237c9dc26
commit 8a667c97fb
2 changed files with 41 additions and 5 deletions
+23
View File
@@ -0,0 +1,23 @@
const {execSync} = require('child_process')
const path = require('path')
const conventionalChangelog = path.join('node_modules', '.bin', 'conventional-changelog')
// sometimes release-count 1 is empty
let releaseChangelog =
execSync(`${conventionalChangelog} --preset angular --release-count 1`).toString() ||
execSync(`${conventionalChangelog} --preset angular --release-count 2`).toString()
// format
releaseChangelog = releaseChangelog.trim().replace(/\n\n+/g, '\n\n')
const releaseBody = `Progressive web app mirrors:
- https://plebchan.eth.limo
- https://plebchan.eth.link
- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)
CLI client:
- https://github.com/plebbit/plebbit-cli/releases/latest
${releaseChangelog}`
console.log(releaseBody)