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 support for make_latest property #304

Merged
merged 10 commits into from
Mar 8, 2024
Merged

Conversation

samueljseay
Copy link
Contributor

@samueljseay samueljseay commented Jan 12, 2023

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.

@softprops
Copy link
Owner

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

@samueljseay
Copy link
Contributor Author

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

@samueljseay
Copy link
Contributor Author

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

@jackalcooper
Copy link

Hi, will this PR be merged?

@DameonSmith
Copy link

Would also like to see this feature.

@damian3031
Copy link

I'm also interested in this feature

@DariuszPorowski
Copy link

@softprops any updates on this? :)

@koehlecn
Copy link

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

@leon1995
Copy link

any news on this?

@kdmiltner
Copy link

Could support to update an existing tag with make_latest be added? Or would this would to set an existing tag to the latest? #385

@theo-issarni-wmx
Copy link

Any news on this ? That would be great !

@softprops
Copy link
Owner

@samueljseay thanks for the pull and sorry for the delay

@softprops softprops merged commit 0bea76b into softprops:master Mar 8, 2024
1 check failed
@softprops softprops mentioned this pull request Mar 8, 2024
@softprops
Copy link
Owner

this should be available in the new v2 tag

cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/renovate-bot Mar 9, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[softprops/action-gh-release](https://github.com/softprops/action-gh-release)
| action | patch | `v2.0.0` -> `v2.0.1` |

---

### Release Notes

<details>
<summary>softprops/action-gh-release
(softprops/action-gh-release)</summary>

###
[`v2.0.1`](https://github.com/softprops/action-gh-release/releases/tag/v2.0.1)

[Compare
Source](https://github.com/softprops/action-gh-release/compare/v2.0.0...v2.0.1)

- Add support for make_latest property
[https://github.com/softprops/action-gh-release/pull/304](https://github.com/softprops/action-gh-release/pull/304)
via [@&#8203;samueljseay](https://github.com/samueljseay)
- Fail run if files setting contains invalid patterns
[https://github.com/softprops/action-gh-release/pull/384](https://github.com/softprops/action-gh-release/pull/384)
via [@&#8203;rpdelaney](https://github.com/rpdelaney)
- Add support for proxy env variables (don't use node-fetch)
[https://github.com/softprops/action-gh-release/pull/386](https://github.com/softprops/action-gh-release/pull/386)/
via [@&#8203;timor-raiman](https://github.com/timor-raiman)
- Suppress confusing warning when input_files is empty
[https://github.com/softprops/action-gh-release/pull/389](https://github.com/softprops/action-gh-release/pull/389)
via [@&#8203;Drowze](https://github.com/Drowze)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
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

Successfully merging this pull request may close these issues.

add support for make_latest parameter
10 participants