Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Publish Artifacts
This PR is a one-stop shop for publishing binaries and archives. Adoption is simple:
git tag -a -m "Publish build artifacts" v0.4.0 git push --tags
TL;DR
This PR adds popular tool GoReleaser and GitHub actions to automatically publish unwrapped binaries, .tar.gz archives, and checksums for MacOS and Linux to GitHub releases whenever a tag is pushed. Example output is visible in the fork's releases page.
Targets
I added targets for both plain binaries and archives. The plain binaries themselves clock in at ~2MB, so there's not much value to the compression of the archives, but the archives also send along the license and README. Checksums for everything are included.
Tech Choices
This PR adopts some very common and popular technology for this project.
GoReleaser
goreleaser
is a very popular and extensible tool for automating release cycles. It is itself a CLI binary, but here we use its GitHub action (Docker container) to make the process as automated as possible. Currently, we define two targets -- vanilla binaries andtar.gz
s of a directory containing the license, README, and binary.Flexibility
reflex
,goreleaser
would support that as well.goreleaser
supports automating releases to package managers likebrew
andsnap
(with additional customization of course)GitHub Actions
GitHub Actions is the most accessible CI/CD platform for a GitHub repository, as with this project.
GitHub Releases
Again, GitHub releases are the most accessible place to store your build artifacts when you've got a GitHub repository. Speaking as a GitHub user, I suspect it's the first place most people look for downloads.
Related issues: