Download latest GitHub release

Github now provides a "Latest release" button on the release page of a project, after you have created your first release.

In the example you gave, this button links to https://github.com/reactiveui/ReactiveUI/releases/latest


You don't need any scripting to generate a download link for the latest release. Simply use this format:

https://github.com/:owner/:repo/zipball/:branch

Examples:

https://github.com/webix-hub/tracker/zipball/master
https://github.com/iDoRecall/selection-menu/zipball/gh-pages

If for some reason you want to obtain a link to the latest release download, including its version number, you can obtain that from the get latest release API:

GET /repos/:owner/:repo/releases/latest

Example:

$.get('https://api.github.com/repos/idorecall/selection-menu/releases/latest', function (data) {
  $('#result').attr('href', data.zipball_url);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a id="result">Download latest release (.ZIP)</a>