Skip to content

Commit eebae82

Browse files
committed
ci: run release notes generator
1 parent 4fb7658 commit eebae82

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.github/scripts/generate-release-notes-local.ts renamed to .github/scripts/generate-release-notes.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/**
2-
* Local helper for generating release notes (TypeScript).
2+
* Release notes generator (TypeScript).
33
*
4-
* This script mirrors the GitHub Actions context generation and then uses
5-
* the Claude Agent SDK (V2 prompt helper) to generate RELEASE_NOTES.md and
6-
* update CHANGELOG.md.
4+
* - In CI: requires VERSION/PREV_TAG/COMMITS/STATS and writes RELEASE_NOTES.md + updates CHANGELOG.md.
5+
* - Locally: computes the same context from git tags/logs and does the same outputs.
76
*
87
* Requirements:
98
* - ANTHROPIC_TOKEN (or ANTHROPIC_API_KEY)
10-
* - git history available (run from a clone with tags)
9+
* - git history available (run from a clone with tags) for local mode
1110
*
1211
* Run via: npm run release:notes
1312
*/

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI/CD Pipeline
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch: {}
67

78
jobs:
89
release-notes-smoke:
@@ -82,14 +83,27 @@ jobs:
8283
} >> $GITHUB_OUTPUT
8384
8485
- name: Generate Release Notes
85-
run: npx tsx .github/scripts/generate-release-notes-local.ts
86+
run: npm run release:notes
8687
env:
8788
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
8889
VERSION: ${{ steps.version.outputs.version }}
8990
PREV_TAG: ${{ steps.version.outputs.previous_tag }}
9091
COMMITS: ${{ steps.context.outputs.commits }}
9192
STATS: ${{ steps.context.outputs.stats }}
9293

94+
- name: Verify RELEASE_NOTES.md
95+
run: |
96+
test -s RELEASE_NOTES.md
97+
echo "--- RELEASE_NOTES.md (first 40 lines) ---"
98+
head -n 40 RELEASE_NOTES.md
99+
100+
- name: Upload release notes artifact
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: release-notes-smoke
104+
path: |
105+
RELEASE_NOTES.md
106+
93107
build-and-test:
94108
name: Build and Test
95109
runs-on: ${{ matrix.os }}
@@ -216,7 +230,7 @@ jobs:
216230
} >> $GITHUB_OUTPUT
217231
218232
- name: Generate Release Notes
219-
run: npx tsx .github/scripts/generate-release-notes-local.ts
233+
run: npm run release:notes
220234
env:
221235
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
222236
VERSION: ${{ steps.version.outputs.version }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
"lint": "eslint",
533533
"test": "node -e \"try{require('fs').rmSync('./.vscode-test/user-data',{recursive:true,force:true});}catch(e){}\" && npx vscode-test",
534534
"test:coverage": "npm run compile-tests && npx vscode-test --coverage",
535-
"release:notes": "tsx .github/scripts/generate-release-notes-local.ts",
535+
"release:notes": "tsx .github/scripts/generate-release-notes.ts",
536536
"deps": "taze"
537537
},
538538
"dependencies": {

0 commit comments

Comments
 (0)