DEV Community

Cover image for How do you distribute your binaries?
Michael Currin
Michael Currin

Posted on

How do you distribute your binaries?

For some programming languages, it makes sense to bundle your application as a single binary file that can be downloaded by someone. So they don't have to compile it themselves or install all the dev dependencies.

For example, a compiled binary executable (made with C, Rust or Go). Or a zipped archive of a package that contains only files needed for installing and running the package.

What is your approach to distributing your binary file and why?

Some more specific prompts:

  • Do add your binary to version control?
  • Do build a release locally and attach it to a GH release?
  • Do you use a CI tool to accomplish either of the above? It is more maintainable to use an Action on GH Actions, or to just write a few steps by hand?

Credits

Cover image by @mathyaskurmann on Unsplash.

Top comments (5)

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

I came across some GitHub Actions recomendations here:

github.community/t/can-you-add-bin...

One solution uses a GitHub-managed action to create a release and upload a file to it.

Example workflow on actions/upload-release-asset

Another solution is upload assets using a glob pattern

github.com/AButler/upload-release-...

Collapse
 
trashhalo profile image
Stephen Solka

For my newest project, imgcat I am using a tool called GoReleaser combined with github actions to release when a new tag is pushed.

why?

With very minimal effort like on the level of copy and pasting 2 files I was able to get automated builds for, windows, linux, and mac. AND it publishes a homebrew formula for easy mac installs.

Collapse
 
michaelcurrin profile image
Michael Currin

Thanks for sharing, I'll check that out.

Collapse
 
michaelcurrin profile image
Michael Currin

I've added a section to my Code Cookbook on this.

It includes workflow files for

  • creating a release
  • uploading assets
  • goreleaser

michaelcurrin.github.io/code-cookb...

Collapse
 
luscala profile image
Luca Scala

My team is shipping floppies to final customers! πŸ˜‚