action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

Add support for make_latest property

Open samueljseay opened this issue 2 years ago • 10 comments

Closes #297

This PR supports the make_latest property of the releases REST API.

I've tested this on my fork and it works well for me. I've kept the behaviour with previous versions by defaulting to true for this property.

I also:

  • updated a dependency via npm audit fix to fix a high risk npm security flag
  • updated tests
  • updated documentation

Please note: make_latest is oddly a string which is why parseConfig returns a string for this property. See the docs.

samueljseay avatar Jan 12 '23 02:01 samueljseay

Thanks!

There's some nuance in the docs that give me pause for the default though

Drafts and prereleases cannot be set as latest.

Does this mean those creating drafts and prereleases would start getting errors with this actions new default?

Defaults to true for newly published releases. legacy specifies that the latest release should be determined based on the release creation date and higher semantic version.

I'm wondering if legacy is the better default for backwards compat or event better leaving it undefined as a default unless a user specifies it explicitly to guarantees compatibility with current behavior

softprops avatar Jan 12 '23 03:01 softprops

Leaving undefined sounds probably better I agree. I'll add a change for that.

samueljseay avatar Jan 12 '23 21:01 samueljseay

@softprops I've adjusted the behaviour to default to undefined.

samueljseay avatar Jan 12 '23 22:01 samueljseay

Hi, will this PR be merged?

jackalcooper avatar Mar 07 '23 11:03 jackalcooper

Would also like to see this feature.

DameonSmith avatar Mar 08 '23 01:03 DameonSmith

I'm also interested in this feature

damian3031 avatar Mar 10 '23 14:03 damian3031

@softprops any updates on this? :)

DariuszPorowski avatar Apr 12 '23 16:04 DariuszPorowski

@softprops Please, can your merge this PR? That would be great! Thank you!

koehlecn avatar May 17 '23 17:05 koehlecn

any news on this?

leon1995 avatar Aug 25 '23 09:08 leon1995

Could support to update an existing tag with make_latest be added? Or would this would to set an existing tag to the latest? https://github.com/softprops/action-gh-release/issues/385

kdmiltner avatar Sep 15 '23 19:09 kdmiltner

Any news on this ? That would be great !

theo-issarni-wmx avatar Jan 26 '24 09:01 theo-issarni-wmx

@samueljseay thanks for the pull and sorry for the delay

softprops avatar Mar 08 '24 21:03 softprops

this should be available in the new v2 tag

softprops avatar Mar 08 '24 21:03 softprops