From 9bad0e582bf48595ecb28fd07fd8bdb365a1215d Mon Sep 17 00:00:00 2001 From: isYangs Date: Thu, 30 Apr 2026 23:10:18 +0800 Subject: [PATCH] fix(ci): publish desktop releases cleanly --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6660e1..497da50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,8 @@ jobs: run: | Get-ChildItem -Path release -Recurse -File | Where-Object { - $_.Name -notlike 'GioPic-*-setup.exe' -and + $_.Name -notlike 'GioPic-*-x64-setup.exe' -and + $_.Name -notlike 'GioPic-*-arm64-setup.exe' -and $_.Name -notlike 'latest*.yml' } | Remove-Item -Force @@ -165,8 +166,15 @@ jobs: if [ -n "$PREV_TAG" ]; then COMPARE_URL="https://github.com/isYangs/GioPic/compare/$PREV_TAG...$TAG" + CHANGELOG_RANGE="$PREV_TAG..HEAD" else COMPARE_URL="https://github.com/isYangs/GioPic/commits/$TAG" + CHANGELOG_RANGE="HEAD" + fi + + CHANGELOG=$(git log --max-count=50 --no-merges --pretty=format:'- %s (%h)' "$CHANGELOG_RANGE") + if [ -z "$CHANGELOG" ]; then + CHANGELOG="- Initial desktop release." fi BODY=$(cat .github/release-template.md) @@ -174,6 +182,7 @@ jobs: BODY="${BODY//\{\{version\}\}/$VERSION}" BODY="${BODY//\{\{prevTag\}\}/$PREV_TAG}" BODY="${BODY//\{\{compareUrl\}\}/$COMPARE_URL}" + BODY="${BODY//\{\{changelog\}\}/$CHANGELOG}" { echo "body<