Skip to content

Commit c968ee1

Browse files
fix: workflow
1 parent 604c72c commit c968ee1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ jobs:
5151
UPLOAD_URL=$(if [ "${{ env.RELEASE_ID }}" == "null" ]; then echo "${{ steps.create_release.outputs.upload_url }}"; else echo "https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets"; fi)
5252
for file in dist/*; do
5353
if [[ -f "$file" ]]; then
54-
echo "Uploading $file"
55-
curl \
56-
--header "Authorization: token ${{ secrets.PAT }}" \
57-
--header "Content-Type: $(file -b --mime-type $file)" \
58-
--data-binary @"$file" \
59-
"$UPLOAD_URL?name=$(basename $file)"
54+
filename=$(basename -- "$file")
55+
extension="${filename##*.}"
56+
if [[ "$extension" == "exe" || "$extension" == "tar.gz" ]]; then
57+
echo "Uploading $file"
58+
curl \
59+
--header "Authorization: token ${{ secrets.PAT }}" \
60+
--header "Content-Type: $(file -b --mime-type $file)" \
61+
--data-binary @"$file" \
62+
"$UPLOAD_URL?name=$(basename $file)"
63+
fi
6064
fi
6165
done

0 commit comments

Comments
 (0)