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

Add option to preserve body #107

Closed
jqnatividad opened this issue May 31, 2023 · 8 comments
Closed

Add option to preserve body #107

jqnatividad opened this issue May 31, 2023 · 8 comments

Comments

@jqnatividad
Copy link

Before #106, the body was preserved even when overwrite is true.

Could this behavior be restored, perhaps, with the addition of another flag - preservebody?

@regevbr
Copy link
Contributor

regevbr commented May 31, 2023

I think that the fix is to check if the body/name are not empty, and overwrite them only in that case, will that solve your case?

@regevbr
Copy link
Contributor

regevbr commented May 31, 2023

see #108

@jqnatividad
Copy link
Author

Thanks @regevbr for the quick reply.

Actually, the fix in my case is to preserve non-empty body when overwrite is true, as I invoke upload-release-action several times after a release build various zip files for a release, and I would like to preserve the body across invocations for the same release.

@regevbr
Copy link
Contributor

regevbr commented May 31, 2023

I believe that is what I did in the fix - if a release exists with a body, and the body in the current action run (not the one from the existing release) does not exist (i.e. empty), then do not override it. Or am I missing something here?

svenstaro added a commit that referenced this issue May 31, 2023
fix #197 - do not overwrite, if empty
@svenstaro
Copy link
Owner

Version 2.6.1 is deployed with a fix thanks to @regevbr. Please check.

@ZheSun88
Copy link

ZheSun88 commented Jun 7, 2023

Hi we are having the same issue as described here. we publish the release note first and then upload one more file in the asset list.

after reading the doc here

overwrite: If an asset with the same name already exists, overwrite it (Default: false).

the overwrite argument seems should only overwrite the file in the assets, instead of overwriting the release note body content.

did i get some something wrong?

@regevbr
Copy link
Contributor

regevbr commented Jun 7, 2023

Did you try the latest version 2.6.1 ?

@ZheSun88
Copy link

ZheSun88 commented Jun 7, 2023

ah, seems the latest the version works for us..

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants