How to upload a JAR to GitHub releases

githubupload

How do I use GitHub releases to upload a JAR file? Attempts to upload a JAR result in a message that ZIP files, among others are supported. JAR files are ZIP files, just with a different extension, of course.

I see that some people have uploaded JAR files directly into repos; is this a work-around?

For example, there is a JAR file at: https://github.com/uklance/releases/tree/master/org/lazan/tapestry-offline/0.0.1

And, yet, GET /repos/:uklance/:releases/releases reveals no releases.

See also this Web Apps question.

Although GitHub does support upload of binaries, that answer is probably out of date.

The message is:

Unfortunately, we don’t support that file type. Try again with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, PDF, or ZIP.

It seems to be same problem as here: Can't upload APK to Github releases

Best Answer

I think you need to create a Release in order to upload a JAR file, as per this blog post.

Or you need the Maven-GitHub-Plugin.