Provide Windows builds and refactor CI #140
Merged
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.
Issue number of the reported bug or feature request: #
Describe your changes
Unify main.yaml and publish.yaml. This guarantees that that large parts of the CI are tested on PR level.
To create Windows images on linux hosts, see: https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx/
Instead going crazy with github actions or any shell scripts, we decided to use https://docs.docker.com/build/bake/ to have an clean declarative definition of all docker images builds. I also integrate the vendored builds. (Why we need vendored builds??)
Testing performed
Test performed on fork PR (cloudeteer#1); see action https://github.com/cloudeteer/goldpinger/actions/runs/6737507377/job/18315100155?pr=1
Additional context
An other clean approach would be https://goreleaser.com/ which handles go build and docker builds, too. Using goreleaser provides native binaries and attach them to the GitHub release.