You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to mark a GitHub release as "Latest" #2678
Describe the feature or problem you’d like to solve
I have a problem in multiple repositories where I've been wanting to apply the Latest release / Latest label to releases in repositories. This is helpful in the event of beta releases, or releasing patched lesser major versions that aren't actually the latest stable releases. The Latest label is what allows for a release to appear on the main page of a repo as the release version people see, and also appears on the Releases page next to a release that has been designated as latest.
It also dictates the contents of badges, like this one from shields.io, that specifically reference the Latest release:
Proposed solution
Add an update arg to gh release.
$ gh release --help
Manage GitHub releases
USAGE
gh release <command> [flags]
CORE COMMANDS
create: Create a new release
delete: Delete a release
download: Download release assets
list: List releases in a repository
upload: Upload assets to a release
view: View information about a release
update: Update an existing release
It could be used to label a release as Latest. I am suggesting gh release update because update seems for fitting for other uses in managing release, such as updating the Markdown/description of an existing release, etc. Otherwise, something like gh release latest could work?
Also, a quick confirmation: Is using gh release create --prerelease the path to ensuring a new release is not taking on the Latest release/Latest label?
Also, a quick confirmation: Is using gh release create --prerelease the path to ensuring a new release is not taking on the Latest release/Latest label?
Yes. "Latest" release is simply the chronologically latest release that is non-draft & non-prerelease. Use the --prerelease tag to avoid making a "latest" release.
Sorry to bump this closed ticket, but I'm actually able to mark an older release as latest from the GitHub web UI.
This allows the latest label to be moved to an older GitHub release. Moving the latest label would be useful to mark what tag is used for production. I can see a scenario where we need to roll back a release on the production environment and wanted the latest label moved to an older release.
For example, the current release is 1.0.0 and it's marked as the latest. I then go on to create the 1.1.0 release. Now the 1.1.0 is the marked latest release. However, let's say we found a critical bug on 1.1.0 that somehow passed QA and we needed to roll back and do some investigation. In this case, I'd like to mark the previous release, 1.0.0 as the latest while I'm working on a hotfix.
Would it be possible to add a --latest parameter where we can set it to true or false? e.g. --latest=true
As of very recently, explicitly declaring the latest release is possible via the make_latest parameter for the Release create REST API. Agreed that we should expose this in GitHub CLI as well.
changed the title [-]Ability to label a GitHub release as "Latest": gh release update[/-][+]Ability to mark a GitHub release as "Latest"[/+]on Oct 24, 2022
Activity
mislav commentedon Jan 4, 2021
Yes. "Latest" release is simply the chronologically latest release that is non-draft & non-prerelease. Use the
--prereleasetag to avoid making a "latest" release.ScriptAutomate commentedon Jan 4, 2021
@mislav Ah, so this seems to be related to GitHub itself rather than the CLI.
I have bumped a GitHub conversation around this, here, in case others are interested:
shyuen commentedon Oct 19, 2022
Sorry to bump this closed ticket, but I'm actually able to mark an older release as

latestfrom the GitHub web UI.This allows the
latestlabel to be moved to an older GitHub release. Moving thelatestlabel would be useful to mark what tag is used for production. I can see a scenario where we need to roll back a release on the production environment and wanted thelatestlabel moved to an older release.For example, the current release is
1.0.0and it's marked as thelatest. I then go on to create the1.1.0release. Now the1.1.0is the markedlatestrelease. However, let's say we found a critical bug on1.1.0that somehow passed QA and we needed to roll back and do some investigation. In this case, I'd like to mark the previous release,1.0.0as thelatestwhile I'm working on a hotfix.Would it be possible to add a
--latestparameter where we can set it totrueorfalse? e.g.--latest=truemislav commentedon Oct 24, 2022
As of very recently, explicitly declaring the latest release is possible via the
make_latestparameter for the Release create REST API. Agreed that we should expose this in GitHub CLI as well.[-]Ability to label a GitHub release as "Latest": gh release update[/-][+]Ability to mark a GitHub release as "Latest"[/+]