mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-27 22:06:03 +00:00
fix(upload): convert Web stream to Node stream
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
parent
6d62ca09e3
commit
bdfc13f36f
2 changed files with 3 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@ import { statSync } from "fs";
|
|||
import { open } from "fs/promises";
|
||||
import { lookup } from "mime-types";
|
||||
import { basename } from "path";
|
||||
import { Readable } from "stream";
|
||||
import { alignAssetName, Config, isTag, releaseBody } from "./util";
|
||||
|
||||
type GitHub = InstanceType<typeof GitHub>;
|
||||
|
@ -180,7 +181,7 @@ export const upload = async (
|
|||
endpoint.searchParams.append("name", name);
|
||||
const fh = await open(path);
|
||||
try {
|
||||
const stream = fh.readableWebStream();
|
||||
const stream = Readable.fromWeb(fh.readableWebStream());
|
||||
const resp = await github.request({
|
||||
method: "POST",
|
||||
url: endpoint.toString(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue