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
+18 -5
View File
@@ -16,6 +16,9 @@ jobs:
steps:
# electron build
- uses: actions/checkout@v2
with:
# needed for git commit history changelog
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
@@ -27,12 +30,13 @@ jobs:
- run: ls dist
# publish version release
- run: node scripts/release-body > release-body.txt
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebchan*.AppImage,dist/plebchan-html*.zip'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
bodyFile: "release-body.txt"
allowUpdates: true
mac:
@@ -42,6 +46,9 @@ jobs:
steps:
# electron build
- uses: actions/checkout@v2
with:
# needed for git commit history changelog
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
@@ -53,12 +60,13 @@ jobs:
- run: ls dist
# publish version release
- run: node scripts/release-body > release-body.txt
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebchan*.dmg'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
bodyFile: "release-body.txt"
allowUpdates: true
windows:
@@ -68,6 +76,9 @@ jobs:
steps:
# electron build
- uses: actions/checkout@v2
with:
# needed for git commit history changelog
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
@@ -77,12 +88,13 @@ jobs:
- run: dir dist
# publish version release
- run: node scripts/release-body > release-body.txt
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebchan*.exe'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
bodyFile: "release-body.txt"
allowUpdates: true
android:
@@ -92,7 +104,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
# needed to use 'git tag' and get all tags
# needed to use 'git tag' and get all tags and for git commit history changelog
fetch-depth: 0
- uses: actions/setup-java@v3
with:
@@ -128,10 +140,11 @@ jobs:
- run: ls dist
# publish version release
- run: node scripts/release-body > release-body.txt
- uses: ncipollo/release-action@v1
with:
artifacts: 'dist/plebchan*.apk'
token: ${{ secrets.GITHUB_TOKEN }}
replacesArtifacts: true
body: "Progressive web app mirrors:\n- https://plebchan.eth.limo\n- https://plebchan.eth.link\n- https://cloudflare-ipfs.com/ipns/plebchan.eth (insecure, no subdomain isolation)\n\nCLI client:\n- https://github.com/plebbit/plebbit-cli/releases/latest"
bodyFile: "release-body.txt"
allowUpdates: true
+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)