3

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
user1767754
  • 23,311
  • 18
  • 141
  • 164
  • 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 :) – herodrigues Feb 19 '19 at 02:14
  • No, we are listing different files, so we don't wan't them to open another page to then download. – user1767754 Feb 19 '19 at 05:02

3 Answers3

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 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. – user1767754 Feb 19 '19 at 06:57
0

you can point to /releases/latest

hhk
  • 119
  • 1
  • 3
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.