0

Scenario


I have 3 releases of this repository in GitHub:

( tags and maybe other required related info could be seen by following the url)

The latest release is the v1.2:

enter image description here

However, the first version is marked as "Latest Release":

enter image description here

Then if I use this url below, I get the earliest version of my releases:

Question


I wonder if its possibly to set the release that I want it to be the latest release, via the GitHub web, with no complicated things.

Research


When I said "with no complicated things" is because I read this post below on which they comment to use the git console, but really I don't want to depend on git console to be clonning my repository and messing with tags and etc just to set the green indicator of the damn Latest Release.

That makes me think whether really GitHub doesn't provide any "Set this as the Latest Release" friendly button on their web?, why they don't?, I hope just I'm missing something in their web because this is very annonying for their online users.

Community
  • 1
  • 1
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
  • 1
    kudos for using [GitHub Dark](https://github.com/stylishthemes/github-dark) :) glad to see people using our project! – ddavison Feb 16 '16 at 19:10
  • 1
    It appears to be handled automatically based on tag date so you can only change it through git. If you don't like the git CLI, you can use a git GUI app instead – mzulch Feb 16 '16 at 19:13
  • @sircapsalot The theme makes anyone feels so familiar that I didn't remembered to deactivate it to give "real" images in my question, congratulations for the design! – ElektroStudios Feb 16 '16 at 19:25
  • @mzulch Thanks for comment, I use this GUI https://desktop.github.com/ but I'm not sure if it support this kind of task, if you know it please let me know. It also comes with portable git console but I would like to avoid using it as specified. – ElektroStudios Feb 16 '16 at 19:26

3 Answers3

4

All three of your tags — 1.0, 1.1, and 1.2 — are linked to this commit. So in this case, all three releases are identical.

If you add or merge a new commit on the master branch that's tagged with 1.3, but don't update the last 3 tags, then this will become your latest release.

If you tag the commit correctly, git tag --contains should only output the latest tag. However:

$ git tag --contains
1.0
1.1
1.2

And as you can see, each tag points to the same commit:

$ git rev-list -1 1.0
6fbce42a8c59b0a06f679a369d19b7a1282023d0
$ git rev-list -1 1.1
6fbce42a8c59b0a06f679a369d19b7a1282023d0
$ git rev-list -1 1.2
6fbce42a8c59b0a06f679a369d19b7a1282023d0

TLDR: Make a new commit, then tag it, and don't update the other tags.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287
  • Thanks for answer, I'm thinking in the way to manage what you suggested to do but I'm not sure how it will affect on the way I do things, please let me know the answer to this little question: To do a new commit, I use this GUI to clone the repository https://desktop.github.com/ , then I do the modifications in the file structure (for example to add a new version folder), then I commit. Doing those steps will update all the three tags?. – ElektroStudios Feb 16 '16 at 19:32
2

Along with all 3 tags being linked to a single commit, I would recommend not creating a new directory for each new release. git will handle the versioning and tags, you do not need to do so using directory structure.

Also, i use Source Tree to maintain git repos and tags.

AndrewK
  • 1,223
  • 2
  • 16
  • 25
0

I wonder if its possibly to set the release that I want it to be the latest release, via the GitHub web, with no complicated things.

Yes. Yes, it is possible, since Oct. 2022:

Explicitly Set the Latest Release (Oct. 2022)

At GitHub, we strive to make it easier for developers to release the best version of their code to users.
As a result, we've rolled out a new feature that allows you to explicitly set which release of your code is the latest.

Previously, a repository's latest release was the one created on the most recent date.
In the event that multiple releases had the same date, the semantic version number broke the tie.

This new feature provides an explicit toggle to mark a release "latest" when you create it.
This gives you more control over your code, and it works both in the web interface and through the API (GraphQL, REST).

https://i0.wp.com/user-images.githubusercontent.com/533773/191272069-4a954c55-6d3b-494f-9db3-57e0d8f7f6b8.png?ssl=1 -- Screenshot of setting to make a release the latest

Read more about releases in the GitHub documentation.

We appreciate feedback on this and other topics in the GitHub Community discussions.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250