* fix: use readableWebStream() to stream asset contents
This allows the uploads to finish without mismatched Content-Length,
likely because the original method implied a wrong body encoding or
something similar. Unfortunately a GitHub server API mock was not
readily available so I had to test manually with a barebones repository.
Fixes: #555Fixes: #556
Signed-off-by: WANG Xuerui <git@xen0n.name>
* feat: log when each asset is successfully uploaded
Signed-off-by: WANG Xuerui <git@xen0n.name>
* build: refresh dist
Signed-off-by: WANG Xuerui <git@xen0n.name>
* style: format with prettier
Signed-off-by: WANG Xuerui <git@xen0n.name>
---------
Signed-off-by: WANG Xuerui <git@xen0n.name>
Previously all assets were being read synchronously into memory, making
the action unsuitable for releasing very large assets. Because the
client library allows stream body inputs (it just forwards it to the
underlying `fetch` implementation), just do it.
The idea is also suggested by @enumag in
https://github.com/softprops/action-gh-release/issues/353#issuecomment-1793865790.
Fixes: #353
Signed-off-by: WANG Xuerui <git@xen0n.name>