docs: add direct-download badges for the desktop apps

Add macOS and Windows download badges (light/dark SVGs) to the README
header, linking to releases/latest/download/<stable name>. The desktop
release workflow now also uploads copies of each installer without the
version in the file name, so those links always resolve to the newest
build once the next release is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bingxi Zhao (Frank)
2026-11-05 18:55:45 +08:00
parent f7aed0744c
commit fe385a8e54
6 changed files with 72 additions and 1 deletions

View File

@@ -206,7 +206,16 @@ jobs:
shopt -s nullglob
files=(out/*.dmg out/*-Setup.exe out/*-Portable.zip)
[ ${#files[@]} -gt 0 ] || { echo "No downloads were produced." >&2; exit 1; }
gh release upload "$RELEASE_TAG" "${files[@]}" --clobber
# Also attach copies without the version in the name, so the README
# can link to releases/latest/download/<name> and always get the newest build.
mkdir -p out/latest
for f in "${files[@]}"; do
name="$(basename "$f")"
stable="${name/-$RELEASE_TAG/}"
[ "$stable" != "$name" ] || { echo "Expected $RELEASE_TAG in $name." >&2; exit 1; }
cp "$f" "out/latest/$stable"
done
gh release upload "$RELEASE_TAG" "${files[@]}" out/latest/* --clobber
- name: Remove the temporary signing keychain
if: always() && runner.os == 'macOS' && env.HAS_DEVELOPER_ID == 'true' && github.event_name != 'pull_request'