4

I have an installer file in the latest release and I want to have a persistent link in the readme to it. It seems that the /releases/latest isn't an alias that I could use to construct the path as /releases/latest/mydownloader.exe

The current workarounds I have:

1) Create a tag release and always delete and recreate it:

github.com/user/project/releases/download/release/install.exe

2) Modify readme.md anytime I do a new release and update path

github.com/user/project/releases/download/20190218/install.exe
2
  • I guess that's intended since a release can have many files in GitHub. Why not pointing the release link in README to /release/latest? If you explain in the readme that the users have to download the .exe file, I'm sure that they will understand :) Feb 19, 2019 at 2:14
  • No, we are listing different files, so we don't wan't them to open another page to then download. Feb 19, 2019 at 5:02

3 Answers 3

2

The tag remains the least intrusive option (you don't have to modify your README, adding a new commit on each release)

As explain in "Is there a link to GitHub for downloading a file in the latest release of a repository?", there is no API support for referencing a latest released file as a permanent link.

1
  • thanks for your reply, at least I can rule out know that there is a workaround and yeah, I will keep updating the tag rather then creating a commit on the readme. Feb 19, 2019 at 6:57
0

you can point to /releases/latest

0

I know this is an old question, but I needed something similar so here is the solution I found.

All we need is to reference the latest release using this path:

github.com/user/project/releases/latest

then we just need to append /download/install.exe, resulting in the following URL which should work:

github.com/user/project/releases/latest/download/install.exe

Note this is different from the path seen when downloading the file from the release page which requires the release name/tag as specified in the question.

I couldn't find documentation for this, but it seems to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.