Skip to content

Commit 93d570b

Browse files
fix: uploadReleaseAsset is supplied with stream rather than buffer (#863)
* uploadReleaseAsset is supplied with stream rather than buffer * Revert log change, to not include upload filesize * Include changefile * Build reflecting reverted log message --------- Co-authored-by: FabianLars <[email protected]>
1 parent f290eb8 commit 93d570b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Diff for: .changes/upload-uses-filestream.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
action: patch
3+
---
4+
5+
Reduces memory consumption when uploading successfully built releases, by passing a file stream object rather than reading the entire file into a buffer and then passing that. Empirically, this has stopped the action from failing on GitHub's Windows runners, with apps approaching 2GB in size.

Diff for: dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/upload-release-assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function uploadAssets(
6363
name: assetName,
6464
// https://github.com/tauri-apps/tauri-action/pull/45
6565
// @ts-expect-error error TS2322: Type 'Buffer' is not assignable to type 'string'.
66-
data: fs.readFileSync(asset.path),
66+
data: fs.createReadStream(asset.path),
6767
owner: owner,
6868
repo: repo,
6969
release_id: releaseId,

0 commit comments

Comments
 (0)