Skip to content

Commit

Permalink
Debug release assets upload
Browse files Browse the repository at this point in the history
  • Loading branch information
janekbaraniewski committed Apr 29, 2024
1 parent a128551 commit 8a99f13
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,25 @@ jobs:
draft: false
prerelease: false

- name: debug upload url
run:
echo "${{ steps.create_release.outputs.upload_url }}"

- name: Upload Release Assets
run: |
for file in artifacts/*; do
echo "Uploading $file"
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: multipart/form-data" \
-F "file=@$file;type=$(file -b --mime-type $file)" \
-F "name=$(basename $file)" \
-F "label=$(basename $file)" \
"${{ steps.create_release.outputs.upload_url }}"
if [ -s "$file" ]; then
echo "Uploading $file"
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: multipart/form-data" \
-F "file=@$file;type=$(file -b --mime-type $file)" \
-F "name=$(basename $file)" \
-F "label=$(basename $file)" \
"${{ steps.create_release.outputs.upload_url }}"
else
echo "Skipping upload for empty file $file"
fi
done
Expand Down

0 comments on commit 8a99f13

Please sign in to comment.