Compile the app as a single binary in the unversioned build
directory.
$ make build
Run the build:
$ build/myapp -h
You can share that binary with others to download and run.
For example, add the binary to a GitHub release as an asset and add Download button in your docs. That will make it easy for someone to download from GitHub.
Note that a binary is specific to an OS and architecture (e.g. Windows 64-bit). Though Go CLI lets you build release for multiple architectures.
It can be useful to install the app globally and then use it a bit before releasing it.
See the Install globally doc.
This project used GitHub Actions for CI.
See the workflow config. This builds the app on pushes.
Nothing is persisted. For info on using CI to build and release your assets, see this guide.
go_project_template_0.4.0_darwin.tar.gz
.The Go Releaser action be used so that GitHub Actions will create a GH release and add built assets to it whenever a tag is pushed.
See my Go Releaser recipe for more info.