Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically add files to a GitHub download page

Tags:

github

[[Please note that Github has changed a lot since this question was first asked; instead of "download page" read "new release".]]

I generate PDF documentation as part of my projects and I'd like them to stay in sync with my Git repository (it's not always possible for people to build their own since they often use proprietary fonts).

However, it's not really "correct" to add the PDFs to the repository since it's a derived file; furthermore, doing this adds significantly to the size of the commits and the size of the repository overall.

Is it possible to programmatically send files to the GitHub download page? (I know that tagged commits are automatically added there with git push --tags but I don't know where this is documented. I suppose I could do something fancy by adding a separate branch only containing the PDFs themselves — as done by the GitHub user pages — but I'm a bit rusty on using Git this way.)

like image 681
Will Robertson Avatar asked Sep 16 '09 05:09

Will Robertson


People also ask

How do I automatically upload files to GitHub?

One potential way to automatically upload files to GitHub is to include "git" commands within the scripts generating the output files to automate the process of committing and pushing these files to your git repository.

How do I add files to an existing Git repository?

To add and commit files to a Git repository Create your new files or edit existing files in your local project directory. Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed.


1 Answers

Github API v3 supports this feature.

GitHub also provides a maven plugin based on the java API that is part of the Eclipse Mylyn connector for GitHub.

There is a ruby gem called github_api.

The other answer talks about net-github-upload which is available for perl and ruby.

like image 83
Mic92 Avatar answered Oct 19 '22 23:10

Mic92