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

Allow marking release as latest with make_latest #2317

Open
bukowa opened this issue Jun 19, 2024 · 0 comments
Open

Allow marking release as latest with make_latest #2317

bukowa opened this issue Jun 19, 2024 · 0 comments
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bukowa
Copy link
Contributor

bukowa commented Jun 19, 2024

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
@bukowa bukowa added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants