-
Notifications
You must be signed in to change notification settings - Fork 136
feat: publish pre-built binaries with releases #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…form release builds - Introduced `.github/workflows/build.yaml` for CI/CD, including build, checksum, and publish jobs - Supports Go cross-compilation for multiple OS/arch targets - Includes artifact attestation and checksum generation - Publishes artifacts to GitHub Releases on tag push - Extended `Makefile` with `release` target to generate static binaries per target - Supports GOOS/GOARCH/GOARM detection and naming
Thanks for the contribution, this kind of prebuilt binary release process is long overdue! Before I dive too far into the code itself, I have a couple of high level questions:
|
One more high level question:
|
Thank you so much for your kind review!
This is a matter of personal preference. I didn't like the fact that a checksum file was generated for each binary when merging jobs. However, this is just my personal preference, and your opinion should take precedence over the rest, so I have no problem with merging the jobs.
Yes, I used GoReleaser for a few years for both work and personal OSS, but in the end I came to the conclusion that it would be easier to maintain if I didn't use it. Because GoReleaser is a tool that handles build infrastructure, you will want to use various functions as you use it, but most of the useful functions are paid plans. This is not a problem when using it for work, but for personal OSS activities, the question of who will bear the costs arises. So what about the free version's functions? It just hides the functions I submitted in this PR, which seems convenient at first glance, but it's the worst when you encounter an edge case. As mentioned above, various functions are hidden and black-boxed, so the burden on maintainers is heavy when analysis is required. Still, everything is a balance, so of course it is important to consider introducing it while taking into account the trade-offs. I respect your opinion on this matter as well.
Speaking from experience, CI that only runs release builds has a high probability of failing (and this is extremely subjective). The reason is that if you run CI on a regular basis, you can detect when there's a problem right away, but things often "silently break," so as someone who values the flow of working smartly, releasing, making a coffee, and taking a breather, I've come to take the stance that it's better to run the release process partially on a regular basis and "find out that CI is broken as soon as possible." On the other hand, I cannot deny that this is a very down-to-earth approach, so as always, I respect your opinion to the fullest extent. |
Thanks for the detailed reply, I appreciate your thoughts here. I hope to dig in this weekend, I’ll keep you posted! |
Motivation
Recently, I noticed that
httpbin.org
was unstable and CI was failing often.I wanted to take advantage of the great implementation in this repository, but my CI environment doesn't support Docker or Go, so I thought it would be convenient to be able to download static binaries.
About
.github/workflows/build.yaml
for CI/CD, including build, checksum, and publish jobsMakefile
withrelease
target to generate static binaries per targetNotes
To check the operation, we issued a test release in the following repository and confirmed that it works properly.
Repository:
https://github.com/takumin/go-httpbin
Commit:
takumin@857d10f
GitHub Action Workflow Log:
https://github.com/takumin/go-httpbin/actions/runs/14769067526
Test GitHub Release:
https://github.com/takumin/go-httpbin/releases/tag/v2.18.2