From 302903af73ac87f4b10eae858f5b19deb13cc454 Mon Sep 17 00:00:00 2001 From: lick <2188718831@qq.com> Date: Mon, 16 Nov 2026 05:33:10 -0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=8A=8A=E6=9C=80=E9=AB=98=E7=89=88=E6=9C=AC=E6=A0=87?= =?UTF-8?q?=E4=B8=BA=20Latest=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=86=99=E6=AD=BB?= =?UTF-8?q?=20--latest=3Dfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit desktop-release.yml 创建发布时固定传 --latest=false(#1985 引入,为了让旧 SwiftUI 客户端读 releases/latest 的 appcast 不受影响),导致 desktop-v0.7.0 起每次发布都不是 Latest,0.8.0 是手动补标的。现在发布前取已发布的 desktop-v* 正式版最高版本,本次版本 不低于它就标 Latest;对旧标签重跑工作流时不会抢走新版本的 Latest。release-lithe Skill 的发布前检查补上“桌面端发布必须是 Latest”。 Co-Authored-By: Claude Opus 5.5 --- .agents/skills/release-lithe/SKILL.md | 5 +++++ .github/workflows/desktop-release.yml | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.agents/skills/release-lithe/SKILL.md b/.agents/skills/release-lithe/SKILL.md index 09ae7d7523..e11090803a 100644 --- a/.agents/skills/release-lithe/SKILL.md +++ b/.agents/skills/release-lithe/SKILL.md @@ -286,6 +286,11 @@ before committing the notes. read well there too. A feed that already offers a later version is left as it is. See `.agents/notes/implemented/feature/2026-11-15-desktop-update-channels-and-dialog.md`. +- For a desktop release, confirm that the published release is marked Latest + on GitHub. The `release` job of `desktop-release.yml` marks it Latest + unless a published desktop release has a higher version, so that + `releases/latest` and the README download links lead to it. Never pass + `--latest=false` for the release of the highest desktop version. - Run `actionlint` after changing a GitHub Actions workflow. Run any focused packaging or manifest checks required by `develop-lithe` for other release changes. diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml index 2ff27202bb..05d509cbac 100644 --- a/.github/workflows/desktop-release.yml +++ b/.github/workflows/desktop-release.yml @@ -2,7 +2,9 @@ name: Desktop Release # Releases the Viva desktop client (desktop/) for macOS, Windows and Linux. Its tags are # desktop-vMAJOR.MINOR.PATCH, apart from the v* tags of the SwiftUI and Tauri clients, and each -# release is stable. Keep the legacy clients' latest release unchanged; desktop updates select desktop-v tags. +# release is stable. The release of the highest desktop version is marked Latest, so the +# releases/latest link and the README download links lead to it; desktop updates select +# desktop-v tags and do not read Latest. on: push: tags: @@ -219,12 +221,20 @@ jobs: RELEASE_TAG: ${{ needs.prepare.outputs.tag }} DESKTOP_VERSION: ${{ needs.prepare.outputs.version }} run: | + # Mark this release Latest unless a published desktop release has a higher version, + # so re-running the workflow for an older tag does not take Latest from a newer one. + newest=$(gh release list --repo "$GITHUB_REPOSITORY" --exclude-drafts --exclude-pre-releases \ + --limit 1000 --json tagName --jq '.[].tagName' | sed -n 's/^desktop-v//p' | sort -V | tail -n 1) + latest=true + if [[ -n "$newest" && "$(printf '%s\n%s\n' "$newest" "$DESKTOP_VERSION" | sort -V | tail -n 1)" != "$DESKTOP_VERSION" ]]; then + latest=false + fi release_args=( --repo "$GITHUB_REPOSITORY" --title "Lithe Desktop $DESKTOP_VERSION" --notes-file "docs/releases/v$DESKTOP_VERSION.md" --prerelease=false - --latest=false + --latest="$latest" ) if ! gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then gh release create "$RELEASE_TAG" --target "$GITHUB_SHA" "${release_args[@]}" || \