Skip to content

Commit 9f86146

Browse files
committed
Fix release workflow to preserve artifact names
The previous approach copied all files to a flat directory, causing binaries with the same name to overwrite each other. Now we preserve the artifact directory names as the final asset names.
1 parent 37bc66f commit 9f86146

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ jobs:
6565
- name: Prepare release assets
6666
run: |
6767
mkdir -p release
68-
find artifacts -type f -exec cp {} release/ \;
68+
for dir in artifacts/*/; do
69+
artifact_name=$(basename "$dir")
70+
if [ -f "$dir/cohort-tracker" ]; then
71+
cp "$dir/cohort-tracker" "release/$artifact_name"
72+
elif [ -f "$dir/cohort-tracker.exe" ]; then
73+
cp "$dir/cohort-tracker.exe" "release/$artifact_name"
74+
fi
75+
done
6976
ls -la release/
7077
7178
- name: Create release

0 commit comments

Comments
 (0)