As a distinct example of a complete build, you can take a look at Earthly's own build. Earthly builds itself, and the build files are available on GitHub:

To invoke Earthly's build, check out the code and then run the following in the root of the repository

earthly +all