Allow marking release as latest
with make_latest
#2317
Open
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? bukforks@1a7d5cc
Describe alternatives you've considered
Simple script that can be executed after release-please
has released:
release-mark-latest:
#!/bin/bash
release_id=$(
gh release list \
--exclude-drafts --exclude-pre-releases \
-L 20 --json tagName | \
jq '.[] | select(.tagName | startswith("<package-name>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