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:
313313 path : npm
314314 - name : Create npm workspace tarball
315315 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
317317 if : startsWith(github.ref, 'refs/tags/v')
318- uses : madhead/semver-utils@v4
319- id : semver
320318 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
322323 - name : Create GitHub release for tag
323324 if : startsWith(github.ref, 'refs/tags/v')
324325 uses : ncipollo/release-action@v1
@@ -327,4 +328,4 @@ jobs:
327328 artifactContentType : application/x-xz
328329 prerelease : ${{ contains(github.ref, '-rc') }}
329330 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
1616.firebase
1717.astro
1818docs /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 101101 "test-leak" : " ./test/leak/leak.sh" ,
102102 "test-types" : " tsd" ,
103103 "package-from-local-build" : " node npm/from-local-build.js" ,
104+ "package-release-notes" : " node npm/release-notes.js" ,
104105 "docs-build" : " node docs/build.mjs" ,
105106 "docs-serve" : " cd docs && npm start" ,
106107 "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