diff --git a/src/github.ts b/src/github.ts index b613c10..60d6499 100644 --- a/src/github.ts +++ b/src/github.ts @@ -1,7 +1,7 @@ import fetch from "node-fetch"; import { GitHub } from "@actions/github/lib/utils"; import { Config, isTag, releaseBody } from "./util"; -import { statSync, readFileSync } from "fs"; +import { statSync, createReadStream } from "fs"; import { getType } from "mime"; import { basename } from "path"; @@ -11,7 +11,7 @@ export interface ReleaseAsset { name: string; mime: string; size: number; - data: Buffer; + data: NodeJS.ReadableStream; } export interface Release { @@ -128,7 +128,7 @@ export const asset = (path: string): ReleaseAsset => { name: basename(path), mime: mimeOrDefault(path), size: statSync(path).size, - data: readFileSync(path) + data: createReadStream(path) }; };