269

Using GitHub's API, I can't get the releases list, but I can get the tags list.

What's the difference between them?

mfaani
  • 33,269
  • 19
  • 164
  • 293
naor
  • 3,460
  • 3
  • 18
  • 13

1 Answers1

322

What's the difference between them?

A tag is a pointer to a specific commit. This pointer can be super charged with some additional information (identity of the creator of the tag, a description, a GPG signature, ...).

A tag is a git concept whereas a Release is GitHub higher level concept.

As stated in the official announcement post from the GitHub blog: "Releases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts."

A Release is created from an existing tag and exposes release notes and links to download the software or source code from GitHub.

Using GitHub's API, I can't get the releases list, but I can get the tags list.

The current version of the GitHub API doesn't expose a way to manage Releases (create, update, ...). I'm pretty sure that this shouldn't take too long before it's exposed.

However, it's currently possible to list the releases and tags of a specific repository.

For instance, the url below will list the 6 releases (as of today) from ReactiveUI

Whereas this one will list the 54 tags (as of today) from the same repository

Creating a release is currently in a process which involves a manual action (adding the release notes, uploading the packages, ...). This explains why tags are not transparently seen as Releases.


If you want to be notified of the API changes, you can subscribe to the GitHub API Changes blog.

However, if you can't wait, the GitHub API home page states "If you have any problems or requests please contact support.". This can be done through an email to support@github.com or this contact form.

Update:

The GitHub API now allows to manipulate Releases. See the announcement.

Dave Powers
  • 2,051
  • 2
  • 30
  • 34
nulltoken
  • 64,429
  • 20
  • 138
  • 130
  • Thanks a lot for your detailed answer. Re: /releases - I get [0 releases for rails](https://api.github.com/repos/rails/rails/releases), which it a bit weird, no? – naor Aug 29 '13 at 18:48
  • 2
    I don't think it's weird. That only means that the Rails team hasn't used the GitHub UI to create a `Release` from an existing `tag`. `Release`s are quite a recent addition. Maybe do the Rails team prefer to stick with their current process and post to their blog whenever a new version is released (see **[3.2.14 announcement](http://weblog.rubyonrails.org/2013/7/23/Rails-3-2-14-has-been-released/)**). – nulltoken Aug 29 '13 at 20:37
  • 12
    +1 for the clear distinction between a tag and a release and what each is for: "A `tag` is a **git** concept whereas a `Release` is **GitHub** higher level concept ... A `Release` is created from an existing `tag` and exposes release notes and links to download the software or source code from GitHub." – Paul Masri-Stone Feb 05 '16 at 18:26
  • It might also worthwhile to know that there's now a command-line tool called [hub](https://github.com/github/hub) that supercharges the capabilities of git. Among these superpowers, there's the ability to push release in the terminal. – Paul Razvan Berg Jan 30 '19 at 14:21
  • 4
    It seems that until you create your first release in GitHub, all of your tags show up under Releases. I find this needlessly confusing. – Frans Oct 19 '20 at 17:33