CI: Remove frontmatter from release notes

This commit is contained in:
Lovell Fuller
2025-07-26 23:58:48 +01:00
parent 9e20a25c5d
commit dda00f63e6
4 changed files with 17 additions and 5 deletions

9
npm/release-notes.js Normal file
View File

@@ -0,0 +1,9 @@
const { readFileSync, writeFileSync } = require('node:fs');
const { version } = require('./package.json');
const versionWithoutPreRelease = version.replace(/-rc\.\d+$/, '');
const markdown = readFileSync(`./docs/src/content/docs/changelog/v${versionWithoutPreRelease}.md`, 'utf8');
const markdownWithoutFrontmatter = markdown.replace(/---\n.*?\n---\n+/s, '');
writeFileSync('./release-notes.md', markdownWithoutFrontmatter);