How do you include a link to a compiled binary on Github?
You can link to a specific file in a GitHub repo using the URL http://github.com/<username>/<project>/blob/<branch>/<path/to/file>. So if you track your compiled binary, you can link to it that way.
Otherwise, you can upload the compiled binary to your project's download page, and distribute that URL.
Since 2d July 2013, you now can define a release.
Releases, a workflow for shipping software to end users.
Releases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts. They're accessible from a repository's homepage:
Releases are accompanied by release notes and links to download the software or source code.
Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.
That is what replaces the old binary upload service, which was removed in December 2012!
Related
It my GitHub Pages page for my project, the only download options are for the .zip and the .tar.gz files (the standard ones including "See this on GitHub"). I want to have a link to download another file (a .exe file) without having to put it in my GitHub repository. How can I do this?
I'm not sure how GitHub Pages relates here (this likely depends on the theme you're using), but one good option for sharing pre-built versions of your software is to create a GitHub Release. This will prompt you to create a tag for the version of your source code you wish to release and let you upload additional files:
Optionally, to include binary files such as compiled programs in your release, drag and drop or select files manually in the binaries box.
This file won't be added to your Git repository. It's attached to the GitHub-specific Release, and it can then be downloaded from your repository's releases tab, just like source archives.
Following page page points to Github's page where pre-build binaries are contained. If I have not found first mentioned page first then I would have not an idea that such page (with pre-build binaries) exists on Github. Is it usual to put some pre-build binaries under releases on GitHub (I've seen it also other times e.g. with gns3)? Is there any link on project's Github page which will point me to releases (maybe I can add releases to corresponding URL but I guess there must be some link which points to it)
The "release" pages is available on any GitHub project. You can access it quickly using the link on top of project (between branches and contributors):
GitHub release page is computed from Git repository tags. The maintainer of the project is free to use it or not, but it's a common practice to transform a git tag into a release, attaching a description (changelog, release note, etc) and/or some files (pre-build packages, setups, DMGs, etc.)
GitHub team wrote a blog post a few years ago to explain this feature.
I want allow users to download executable of one of my project on github, without downloading all sources or browsing the entire project.
According to this similar question, you could use a upload/download service, which apparently, github has shut down.
So is there another way? Is github aiming at sharing code only, not software?
Update 2d July 2013, you now can define a release.
Releases are accompanied by release notes and links to download the software or source code.
Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.
This is what replaces the old binary upload service, which was removed in December 2012!
Ideally, you would store your executable in an artifact repository, as opposed as a source repository like GitHub.
So yes, GitHub is for source control management, not deliveries (like binaries produced from your code).
Nexus is the usual choice for any generated artifacts like binaries, with a free upload possibility for open-source projects.
See "How do I get my software into Central?" (from this answer, also mentioned in "Maven repository hosting for non-public artifacts?")
You can create another repository to host all your builds , I mean executable files . With in that repository don't add any of your code other than your builds ,
As a result of this , people can click on download Zip button at git hub , which downloads only executable ( as a zip file ).
while building you can copy the executable file in a folder just push to remote repository which is hosting only builds .
Hope this helps .
basically , GIT is just an SCM ( source code management system ) it is not meant for this purpose .
but still this how you can utilize the service of github.org amd git .
hope this helps .
EDIT : -
Git hub now has a solution for hosting releases it has been well explained by #VonC in the post below . Please use that as a solution.
The following worked for me, YMMV. On a MAC and using Chrome browser, after getting to this page I clicked on the "Raw" button (the "View Raw" link also worked), and it downloaded the executable tatuMicro.kit to my Downloads folder
An exe file can be hosted under releases and the link can be distributed among friends etc. I tested it as recently as yesterday. Only issue is if someone sabotages the program for profit. The exe files can be moved around and distributed easily on pendrives.
I have a small github repo to convert MS Word Documents, but most people will just want the binary.
Should I
Reorganise my repo to have a src/ and bin/ directories with the most up to
date .exe in with the code and expect people to download the whole lot?
Compile and place my binary somewhere else on the web and link to it?
Include my binary in my repo but link to it seperately?
To host that binary for your application, you now can, since 2nd July 2013, define a release.
Releases, a workflow for shipping software to end users.
Releases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts. They're accessible from a repository's homepage:
Releases are accompanied by release notes and links to download the software or source code.
Following the conventions of many Git projects, releases are tied to Git tags. You can use an existing tag, or let releases create the tag when it's published.
You can also attach binary assets (such as compiled executables, minified scripts, documentation) to a release. Once published, the release details and assets are available to anyone that can view the repository.
That replaces the old binary upload service, which was removed in December 2012 (as you mention in your question).
Probably not what you want to hear, but in your case this is mostly personal preference.
You don't have to store the binary in the repo, because it is no important dependency.
It is the other way around: everything you need to recreate the file should be in your repository (including Makefiles/project files).
You can store the binary in the repo because it is fairly small.
You should not store it in the repository when the overall size in the repository (base size + diffs, depending how big the diffs are) is overwhelming, but this does not seem to be the case (500 KiB according to your repo).
My personal preference is to never store generated files (binaries, but also generated text files) in the repo.
Possibly because I have experience with 2 GiB csv repositories that take ages to pull. (to be fair: it also takes ages to compile)
For my github project I created a subdomain on some webspace where I put all my downloads and the index page of that subdomain forwards to my github-pages.
The github pages link to the downloads on my webspace subdomain.
Just because I like my github subdomain a bit more for this project.
My tool works for different platforms though, so not every user needs every binary file.
The binaries actually are backends (therefore dependencies), but interchangeable/optional
You can have a look at my setup.
You can try this:
http://sourceforge.net/publish/?source=github
It looks promising to be able to "create on Github but distribute on Sourceforge".
How to get the source code for the trunk or a certain branch for projects hosted in github. Is it available in a zip or tar.gz format.
I am aware that I could check out a branch / tag and zip the source code. But I am curious to know if it is automated and is available as part of the release cycle.
Note: This is usually available for projects hosted in Apache Software Foundation.
It is possible: go to github.com// and click on download. You should be able to download the source in .zip and .tar.gz formats.
This works for both branches and tags, you just have to change your current branch/tag.