mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
21 lines
540 B
JavaScript
21 lines
540 B
JavaScript
const fs = require('fs')
|
|
const { execSync } = require('child_process')
|
|
|
|
execSync('git show HEAD -- CHANGELOG.md > CHANGELOG.diff')
|
|
|
|
const tag = execSync('git tag --points-at HEAD').toString().trim()
|
|
|
|
fs.writeFileSync(
|
|
'notes.md',
|
|
fs
|
|
.readFileSync('CHANGELOG.diff')
|
|
.toString()
|
|
.split('\n')
|
|
.filter((line) => line.startsWith('+') && !line.startsWith('+++'))
|
|
.map((line) => line.slice(1))
|
|
.slice(3)
|
|
.join('\n'),
|
|
)
|
|
|
|
execSync(`gh release create ${tag} -F notes.md --title ${tag} --discussion-category Releases`)
|