下载最新的 GitHub 版本 [英] Download latest GitHub release

查看:40
本文介绍了下载最新的 GitHub 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在我的网站上有下载最新版本"按钮,它代表最新版本的链接(存储在 GitHub 版本).我尝试创建名为 "latest" 的发布标签,但是当我尝试加载新版本时变得很复杂(与标签创建日期、标签互换等混淆).手动更新我网站上的下载链接也是一项耗时且严谨的任务.我看到了唯一的方法 - 将所有下载按钮重定向到某个 html,然后重定向到实际的最新版本.

I'd like to have "Download Latest Version" button on my website which would represent the link to the latest release (stored at GitHub Releases). I tried to create release tag named "latest", but it became complicated when I tried to load new release (confusion with tag creation date, tag interchanging, etc.). Updating download links on my website manually is also a time-consuming and scrupulous task. I see the only way - redirect all download buttons to some html, which in turn will redirect to the actual latest release.

请注意,我的网站托管在 GitHub Pages(静态托管)上,因此我只是无法使用服务器端脚本来生成链接.有什么想法吗?

Note that my website is hosted at GitHub Pages (static hosting), so I simply can't use server-side scripting to generate links. Any ideas?

推荐答案

Github 现在在项目的发布页面上提供一个最新版本"按钮,在您创建第一个版本后.

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

在您提供的示例中,此按钮链接到 https://github.com/reactiveui/ReactiveUI/发布/最新

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

这篇关于下载最新的 GitHub 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆