File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -313,12 +313,13 @@ jobs:
313
313
path : npm
314
314
- name : Create npm workspace tarball
315
315
run : tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
316
- - name : Parse semver for tag
316
+ - uses : actions/setup-node@v4
317
317
if : startsWith(github.ref, 'refs/tags/v')
318
- uses : madhead/semver-utils@v4
319
- id : semver
320
318
with :
321
- version : ${{ github.ref_name }}
319
+ node-version : " 24"
320
+ - name : Create release notes
321
+ if : startsWith(github.ref, 'refs/tags/v')
322
+ run : npm run package-release-notes
322
323
- name : Create GitHub release for tag
323
324
if : startsWith(github.ref, 'refs/tags/v')
324
325
uses : ncipollo/release-action@v1
@@ -327,4 +328,4 @@ jobs:
327
328
artifactContentType : application/x-xz
328
329
prerelease : ${{ contains(github.ref, '-rc') }}
329
330
makeLatest : ${{ !contains(github.ref, '-rc') }}
330
- bodyFile : " docs/src/content/docs/changelog/v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}.${{ steps.semver.outputs.patch }}.md "
331
+ bodyFile : release-notes.md
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ package-lock.json
16
16
.firebase
17
17
.astro
18
18
docs /dist
19
+ release-notes.md
Original file line number Diff line number Diff line change
1
+ const { readFileSync, writeFileSync } = require ( 'node:fs' ) ;
2
+
3
+ const { version } = require ( './package.json' ) ;
4
+ const versionWithoutPreRelease = version . replace ( / - r c \. \d + $ / , '' ) ;
5
+
6
+ const markdown = readFileSync ( `./docs/src/content/docs/changelog/v${ versionWithoutPreRelease } .md` , 'utf8' ) ;
7
+ const markdownWithoutFrontmatter = markdown . replace ( / - - - \n .* ?\n - - - \n + / s, '' ) ;
8
+
9
+ writeFileSync ( './release-notes.md' , markdownWithoutFrontmatter ) ;
Original file line number Diff line number Diff line change 101
101
"test-leak" : " ./test/leak/leak.sh" ,
102
102
"test-types" : " tsd" ,
103
103
"package-from-local-build" : " node npm/from-local-build.js" ,
104
+ "package-release-notes" : " node npm/release-notes.js" ,
104
105
"docs-build" : " node docs/build.mjs" ,
105
106
"docs-serve" : " cd docs && npm start" ,
106
107
"docs-publish" : " cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
You can’t perform that action at this time.
0 commit comments