Is there a link to GitHub for downloading a file in the latest release of a repository?

前端 未结 18 2282
情深已故
情深已故 2020-12-02 04:26

Using GitHub\'s Release feature, it is possible to provide a link to download a specific version of the published software. However, every time a release is made, the gh-pag

18条回答
  •  渐次进展
    2020-12-02 04:58

    The Linking to releases help page does mention a "Latest Release" button, but that doesn't get you a download link.

    https://github.com/reactiveui/ReactiveUI/releases/latest

    For that, you need to get the latest tag first (as mentioned in "GitHub URL for latest release of the download file?"):

    latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
    
    curl -L https://github.com/reactiveui/ReactiveUI/releases/download/$latestTag/ReactiveUI-$latestTag.zip
    

提交回复
热议问题