Skip to content

Allow marking release as latest with make_latest #2317

Open
@bukowa

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

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions