Skip to content

Commit

Permalink
chore(ci): fix binary names in release upload
Browse files Browse the repository at this point in the history
rename binary during asset upload to properly escape the filename for
the github API call.

(Github API states:
> GitHub renames asset filenames that have special characters,
non-alphanumeric characters, and leading or trailing periods. The "List
release assets" endpoint lists the renamed filenames. For more
information and help, contact GitHub Support.
)
  • Loading branch information
charles-cooper committed Sep 7, 2023
1 parent 0cb37e3 commit 1356b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
-X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${BIN_NAME}" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${BIN_NAME/+/%2B}" \
--data-binary "@${BIN_NAME}"
done
Expand Down

0 comments on commit 1356b97

Please sign in to comment.