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?
Cover image by @mathyaskurmann on Unsplash.
Top comments (5)
I came across some GitHub Actions recomendations here:
One solution uses a GitHub-managed action to create a release and upload a file to it.
Example workflow on
Another solution is upload assets using a glob pattern
I've added a section to my Code Cookbook on this.
It includes workflow files for
For my newest project, imgcat I am using a tool called GoReleaser combined with github actions to release when a new tag is pushed.
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.
Thanks for sharing, I'll check that out.
My team is shipping floppies to final customers! 😂