build: embed Windows release resources

This commit is contained in:
2026-09-11 09:24:32 +00:00
parent 6c35c1a1d3
commit ea8a4d8846
3 changed files with 100 additions and 0 deletions
+6
View File
@@ -8,6 +8,7 @@ ARG PROTOC_AMD64_SHA256=a45cda0989c17dd950db55f6fbe1e5814c50fda08e87aa422980ac1f
ARG PROTOC_ARM64_SHA256=36b518ac14d90351cc6598228ed2bbe5afe4e357b1af470b07e0ec1609875de2
ARG PROTOC_GEN_GO_VERSION=1.36.12
ARG PROTOC_GEN_GO_GRPC_VERSION=1.6.2
ARG GO_WINRES_VERSION=0.3.3
ARG TARGETARCH
ENV GOCACHE=/cache/go-build \
@@ -34,6 +35,11 @@ RUN apt-get update \
RUN GOBIN=/usr/local/bin go install "google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION}" \
&& GOBIN=/usr/local/bin go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION}"
# Release packaging generates a temporary, architecture-suffixed Windows
# resource object with this pinned pure-Go tool. It is intentionally part of
# the toolchain image rather than a host prerequisite.
RUN GOBIN=/usr/local/bin go install "github.com/tc-hib/go-winres@v${GO_WINRES_VERSION}"
RUN mkdir -p /cache/go-build /cache/go/pkg/mod /cache/xdg /workspace \
&& chown -R 1001:1001 /cache /workspace