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

前端 未结 18 2326
情深已故
情深已故 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 05:03

    I want to download the releases from the README.md file in the repository description. There, I cannot execute JavaScript.

    I can add links like these to the README file or github pages for all of my repositories:

    • https://niccokunzmann.github.io/download_latest///
      Downloads the latest release file from the repository.
    • https://niccokunzmann.github.io/download_latest/
      This works because the JavaScript referrer is set and the repository to download is determined through document.referrer. Thus, the link will also work for forks.

    You can find the source code here, fork or just use my repo.

提交回复
热议问题