Skip to content

Commit 8c0c6fa

Browse files
committed
fix: release notes miss
1 parent bd7efcb commit 8c0c6fa

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/lib/release.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default class Release extends Base {
7575
repo: this.repo,
7676
tag_name: `v${this.version}`,
7777
name: `Release v${this.version}`,
78-
bofy: await this.getChangelog(),
78+
body: await this.getChangelog(),
7979
prerelease: this.version.includes("-"),
8080
make_latest: "true",
8181
});
@@ -149,13 +149,19 @@ export default class Release extends Base {
149149
owner: this.owner,
150150
repo: this.repo,
151151
tag_name: "release",
152-
name: "Release Manifest",
153-
body: `This release is used to host \`update.json\`, please do not delete or modify it! \n Updated in UTC ${new Date().toISOString()} for version ${this.version}`,
154-
make_latest: "false",
155152
}));
156153

157154
if (!release) throw new Error("Get or create 'release' failed.");
158155

156+
await this.client.repos.updateRelease({
157+
owner: this.owner,
158+
repo: this.repo,
159+
release_id: release.id,
160+
name: "Release Manifest",
161+
body: `This release is used to host \`update.json\`, please do not delete or modify it! \n Updated in UTC ${new Date().toISOString()} for version ${this.version}`,
162+
make_latest: "false",
163+
});
164+
159165
const existAssets = await this.client.repos
160166
.listReleaseAssets({
161167
owner: this.owner,
@@ -181,14 +187,15 @@ export default class Release extends Base {
181187
}
182188
}
183189

184-
getChangelog() {
190+
getChangelog(): Promise<string> {
185191
return new Promise((resolve, reject) => {
186192
let changelog = "";
187193
conventionalChangelog({ releaseCount: 2 }, { version: this.version })
188194
.on("data", (chunk) => {
189195
changelog += chunk.toString();
190196
})
191197
.on("end", () => {
198+
this.logger.debug("changelog:", changelog);
192199
resolve(changelog);
193200
})
194201
.on("error", (err) => {

0 commit comments

Comments
 (0)