Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: read the release assets asynchronously #552

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

xen0n
Copy link
Contributor

@xen0n xen0n commented Dec 6, 2024

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.

Fixes: #353

@xen0n
Copy link
Contributor Author

xen0n commented Dec 6, 2024

Note: I haven't tested this change myself, because my workflow takes 2 hours to finish and I have just finished one run, so I'm just uploading my 8GiB of assets manually this time to fix the release. Testing is welcome.

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
softprops#353 (comment).

Fixes: softprops#353
Signed-off-by: WANG Xuerui <git@xen0n.name>
Copy link
Collaborator

@chenrui333 chenrui333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chenrui333 chenrui333 merged commit 64f1fa1 into softprops:master Dec 11, 2024
1 check passed
@chenrui333
Copy link
Collaborator

@xen0n thanks a lot for your contribution!

@xen0n xen0n deleted the async branch December 11, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The runner has received a shutdown signal
2 participants