Skip to content

Commit

Permalink
fix: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsSov8forUs committed Apr 19, 2024
1 parent 604c72c commit c968ee1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ jobs:
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)
for file in dist/*; do
if [[ -f "$file" ]]; then
echo "Uploading $file"
curl \
--header "Authorization: token ${{ secrets.PAT }}" \
--header "Content-Type: $(file -b --mime-type $file)" \
--data-binary @"$file" \
"$UPLOAD_URL?name=$(basename $file)"
filename=$(basename -- "$file")
extension="${filename##*.}"
if [[ "$extension" == "exe" || "$extension" == "tar.gz" ]]; then
echo "Uploading $file"
curl \
--header "Authorization: token ${{ secrets.PAT }}" \
--header "Content-Type: $(file -b --mime-type $file)" \
--data-binary @"$file" \
"$UPLOAD_URL?name=$(basename $file)"
fi
fi
done

0 comments on commit c968ee1

Please sign in to comment.