Skip to content

Commit

Permalink
fix(updater): use release body as updater note (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 authored Jan 27, 2024
1 parent 506e1df commit 9db0bac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ jobs:
run: pnpm updater
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
RELEASE_BODY: ${{ github.event.release.body }}
3 changes: 2 additions & 1 deletion scripts/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorize, consola } from "./utils/logger";
const UPDATE_TAG_NAME = "updater";
const UPDATE_JSON_FILE = "update.json";
const UPDATE_JSON_PROXY = "update-proxy.json";
const UPDATE_RELEASE_BODY = process.env.RELEASE_BODY || "";

/// generate update.json
/// upload to update tag's release asset
Expand Down Expand Up @@ -36,7 +37,7 @@ async function resolveUpdater() {

const updateData = {
name: tag.name,
notes: await resolveUpdateLog(tag.name), // use updatelog.md
notes: (await resolveUpdateLog(tag.name)) || UPDATE_RELEASE_BODY || "", // use updatelog.md
pub_date: new Date().toISOString(),
platforms: {
win64: { signature: "", url: "" }, // compatible with older formats
Expand Down

0 comments on commit 9db0bac

Please sign in to comment.