5

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

2

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.

1
  • The op asked "how do I use github Releases to ...." and this answer says to create a github release? That doesn't answer the question. Apr 25 '21 at 0:26
0

You need to drag the jar into the lower part of the Release window, that says "Attach binaries by dropping them here or selecting them."

Jar is a supported file type for a binary, but it is not a supported file type for the release description.

I had the same problem, before I realized what went wrong.

Just leaving this here for future generations.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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