@@ -97,11 +97,71 @@ jobs:
9797 uses : actions/download-artifact@v4
9898 with :
9999 pattern : " *-artifacts"
100- path : dist
101- merge-multiple : true
100+ path : artifacts
101+ merge-multiple : false
102+
103+ - name : Prepare release assets
104+ shell : bash
105+ run : |
106+ set -euo pipefail
107+ shopt -s nullglob
108+
109+ mkdir -p release_upload
110+
111+ # --- Windows (x64) ---
112+ if [[ -d artifacts/windows-x64-artifacts ]]; then
113+ for file in artifacts/windows-x64-artifacts/*.exe; do
114+ cp "$file" release_upload/
115+ done
116+ for file in artifacts/windows-x64-artifacts/*.exe.blockmap; do
117+ cp "$file" release_upload/
118+ done
119+ if [[ -f artifacts/windows-x64-artifacts/latest.yml ]]; then
120+ cp artifacts/windows-x64-artifacts/latest.yml release_upload/latest.yml
121+ fi
122+ fi
123+
124+ # --- Windows (ia32) ---
125+ if [[ -d artifacts/windows-ia32-artifacts ]]; then
126+ for file in artifacts/windows-ia32-artifacts/*.exe; do
127+ base="$(basename "$file")"
128+ ext="${base##*.}"
129+ stem="${base%.$ext}"
130+ cp "$file" "release_upload/${stem}-ia32.${ext}"
131+ done
132+ for file in artifacts/windows-ia32-artifacts/*.exe.blockmap; do
133+ base="$(basename "$file")"
134+ cp "$file" "release_upload/${base/.exe/-ia32.exe}"
135+ done
136+ if [[ -f artifacts/windows-ia32-artifacts/latest.yml ]]; then
137+ cp artifacts/windows-ia32-artifacts/latest.yml release_upload/latest-ia32.yml
138+ fi
139+ fi
140+
141+ # --- macOS ---
142+ if [[ -d artifacts/macos-artifacts ]]; then
143+ for pattern in "*.dmg" "*.dmg.blockmap" "latest-mac*.yml"; do
144+ for file in artifacts/macos-artifacts/$pattern; do
145+ cp "$file" release_upload/
146+ done
147+ done
148+ fi
149+
150+ # --- Linux variants ---
151+ for dir in linux-x64-artifacts linux-arm64-artifacts linux-armv7l-artifacts; do
152+ if [[ -d artifacts/$dir ]]; then
153+ for pattern in "*.AppImage" "*.deb" "latest-linux*.yml"; do
154+ for file in artifacts/$dir/$pattern; do
155+ cp "$file" release_upload/
156+ done
157+ done
158+ fi
159+ done
160+
161+ shopt -u nullglob
102162
103163 - name : List files to upload (debug)
104- run : ls -alR dist
164+ run : ls -alR release_upload
105165
106166 - name : Create/Update GitHub Release
107167 uses : softprops/action-gh-release@v2
@@ -112,13 +172,7 @@ jobs:
112172 draft : false
113173 prerelease : false
114174 files : |
115- dist/*.exe
116- dist/*.exe.blockmap
117- dist/*.dmg
118- dist/*.dmg.blockmap
119- dist/*.AppImage
120- dist/*.deb
121- dist/latest*.yml
175+ release_upload/**
122176 env :
123177 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
124178
0 commit comments