googleapis / googleapis/release-please
Allow marking release as `latest` with `make_latest`
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
**Is your feature request related to a problem? Please describe.**
When in a monorepo with multiple packages that make up a single main package `release-please` creates releases, the last one that gets published is marked as `latest`. This is not desired because only the most recent `root package` should be marked as `latest`.
**Describe the solution you'd like**
Additional flag `mark_latest` (from github api docs):
```
make_latest string
Specifies whether this release should be set as the latest release for the repository.
Drafts and prereleases cannot be set as latest.
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.
Default: true
Can be one of: true, false, legacy
```
This should work? https://github.com/bukforks/release-please/commit/1a7d5cc3e2b96f8caea9f499fb67bba974c690de
**Describe alternatives you've considered**
Simple script that can be executed after `release-please` has released:
```makefile
release-mark-latest:
#!/bin/bash
release_id=$(
gh release list \
--exclude-drafts --exclude-pre-releases \
-L 20 --json tagName | \
jq '.[] | select(.tagName | startswith("v")) | .[]' -r | head -n1)
# ask for confirmation
read -p "Mark release $release_id as latest? [y/N] " -n 1 -r
gh release edit $release_id --latest
```
Contributor guide
Assessment
This issue has not been assessed yet.