feat: add Changelog.md and update scripts to reference it

- Created a new Changelog.md file to document version updates and changes.
- Updated the updatelog.mjs script to parse Changelog.md instead of UPDATELOG.md.
- Modified updater-fixed-webview2.mjs to use the new Changelog.md for update notes.
This commit is contained in:
Tunglies
2025-11-09 01:09:10 +08:00
parent 2a13696d06
commit 8f080389fe
8 changed files with 268 additions and 269 deletions

View File

@@ -2,9 +2,9 @@ import fs from "fs";
import fsp from "fs/promises";
import path from "path";
const UPDATE_LOG = "UPDATELOG.md";
const UPDATE_LOG = "Changelog.md";
// parse the UPDATELOG.md
// parse the Changelog.md
export async function resolveUpdateLog(tag) {
const cwd = process.cwd();
@@ -14,7 +14,7 @@ export async function resolveUpdateLog(tag) {
const file = path.join(cwd, UPDATE_LOG);
if (!fs.existsSync(file)) {
throw new Error("could not found UPDATELOG.md");
throw new Error("could not found Changelog.md");
}
const data = await fsp.readFile(file, "utf-8");
@@ -38,7 +38,7 @@ export async function resolveUpdateLog(tag) {
});
if (!map[tag]) {
throw new Error(`could not found "${tag}" in UPDATELOG.md`);
throw new Error(`could not found "${tag}" in Changelog.md`);
}
return map[tag].join("\n").trim();
@@ -49,7 +49,7 @@ export async function resolveUpdateLogDefault() {
const file = path.join(cwd, UPDATE_LOG);
if (!fs.existsSync(file)) {
throw new Error("could not found UPDATELOG.md");
throw new Error("could not found Changelog.md");
}
const data = await fsp.readFile(file, "utf-8");
@@ -77,7 +77,7 @@ export async function resolveUpdateLogDefault() {
}
if (!firstTag) {
throw new Error("could not found any version tag in UPDATELOG.md");
throw new Error("could not found any version tag in Changelog.md");
}
return content.join("\n").trim();

View File

@@ -1,4 +1,4 @@
import { getOctokit, context } from "@actions/github";
import { context, getOctokit } from "@actions/github";
import fetch from "node-fetch";
import { resolveUpdateLog } from "./updatelog.mjs";
@@ -36,7 +36,7 @@ async function resolveUpdater() {
const updateData = {
name: tag.name,
notes: await resolveUpdateLog(tag.name), // use updatelog.md
notes: await resolveUpdateLog(tag.name), // use Changelog.md
pub_date: new Date().toISOString(),
platforms: {
"windows-x86_64": { signature: "", url: "" },