Skip to content

Commit

Permalink
Debug release assets further
Browse files Browse the repository at this point in the history
  • Loading branch information
janekbaraniewski committed Apr 29, 2024
1 parent 8a99f13 commit e9c0b75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,17 @@ jobs:
for file in artifacts/*; do
if [ -s "$file" ]; then
echo "Uploading $file"
# Extract the correct URL by removing the unnecessary template part
UPLOAD_URL="${{ steps.create_release.outputs.upload_url }}"
UPLOAD_URL="${UPLOAD_URL%\{*}" # Removes {?name,label}
FILE_NAME=$(basename "$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 }}"
-F "name=${FILE_NAME}" \
"${UPLOAD_URL}?name=${FILE_NAME}"
else
echo "Skipping upload for empty file $file"
fi
Expand Down

0 comments on commit e9c0b75

Please sign in to comment.