From 680bcc6b715628af4950f55183147b0e28eb9701 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 13 Jan 2026 11:19:42 +0800 Subject: [PATCH] WIP --- .github/workflows/beta-release.yml | 2 +- extra/generate-changelog.mjs | 2 +- extra/release/beta.mjs | 6 +++--- extra/release/lib.mjs | 8 +++++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index b9522c5be..9054e5d4e 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -82,5 +82,5 @@ jobs: uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: dist-${{ inputs.version }} - path: dist.tar.gz + path: ./tmp/dist.tar.gz retention-days: 90 diff --git a/extra/generate-changelog.mjs b/extra/generate-changelog.mjs index ded650171..18ec20983 100644 --- a/extra/generate-changelog.mjs +++ b/extra/generate-changelog.mjs @@ -10,7 +10,7 @@ const mergeList = ["Translations Update from Weblate", "Update dependencies"]; const template = ` -LLM Task: Please help to put above PRs into the following sections based on their content. If a PR fits multiple sections, choose the most relevant one. If a PR doesn't fit any section, place it in "Others". If there are grammatical errors in the PR titles, please correct them. Don't change the PR numbers and authors, and keep the format. Output as markdown. +LLM Task: Please help to put above PRs into the following sections based on their content. If a PR fits multiple sections, choose the most relevant one. If a PR doesn't fit any section, place it in "Others". If there are grammatical errors in the PR titles, please correct them. Don't change the PR numbers and authors, and keep the format. Output as markdown file format. Changelog: diff --git a/extra/release/beta.mjs b/extra/release/beta.mjs index 3a11c4af0..caa3fd387 100644 --- a/extra/release/beta.mjs +++ b/extra/release/beta.mjs @@ -48,12 +48,12 @@ await checkTagExists(repoNames, version); // node extra/beta/update-version.js execSync("node ./extra/beta/update-version.js"); -// Build frontend dist -buildDist(); - // Create Pull Request await createReleasePR(version, previousVersion, dryRun); +// Build frontend dist +buildDist(); + if (!dryRun) { // Build slim image (rootless) buildImage( diff --git a/extra/release/lib.mjs b/extra/release/lib.mjs index a8a145c73..b1c4bc377 100644 --- a/extra/release/lib.mjs +++ b/extra/release/lib.mjs @@ -266,7 +266,7 @@ export function checkReleaseBranch() { */ export async function createDistTarGz() { const distPath = "dist"; - const outputPath = "dist.tar.gz"; + const outputPath = "./tmp/dist.tar.gz"; // Check if dist directory exists if (!fs.existsSync(distPath)) { @@ -302,13 +302,15 @@ export async function createReleasePR(version, previousVersion, dryRun) { const changelog = await generateChangelog(previousVersion); const title = dryRun ? `[DRY RUN] Update to ${version}` : `Update to ${version}`; - const body = `## Beta Release ${version} + const body = `## Release ${version} -This PR prepares the beta release for version ${version}. +This PR prepares the release for version ${version}. ### Changelog +\`\`\`md ${changelog} +\`\`\` ### Release Artifacts