build: verify source before cross-compiling releases

This commit is contained in:
2026-08-25 22:48:03 +08:00
parent 70fbfc2889
commit e71e0c74dd
3 changed files with 7 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
.git
dist
*.exe
+3 -1
View File
@@ -4,7 +4,9 @@ WORKDIR /src
COPY go.mod ./
COPY *.go ./
COPY web ./web
RUN mkdir -p /out/download \
RUN go test ./... \
&& go vet ./... \
&& mkdir -p /out/download \
&& CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/download/lrc-local-windows-amd64.exe . \
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/download/lrc-local-linux-amd64 . \
&& CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/download/lrc-local-darwin-arm64 . \
+1 -1
View File
@@ -5,7 +5,7 @@ services:
build:
context: .
args:
VERSION: v2026.08.25-r1
VERSION: v2026.08.25-r2
restart: unless-stopped
ports:
- "127.0.0.1:8083:8080"