build(release): add tag-based release automation and version metadata

This commit is contained in:
alphago9
2026-03-30 01:37:08 +08:00
parent fc8d58024e
commit dea81caa61
11 changed files with 312 additions and 69 deletions
+4 -2
View File
@@ -2,13 +2,15 @@ FROM golang:alpine AS builder
RUN apk add --no-cache --update git build-base
ENV CGO_ENABLED=1
ARG VERSION=0.0.0-dev
ARG COMMIT=none
ARG DATE=unknown
WORKDIR /app
COPY ./src/go.mod ./src/go.sum ./
RUN go mod download
COPY ./src .
RUN go mod tidy \
&& go build -ldflags "-s -w" \
RUN go build -ldflags "-s -w -X github.com/assimon/luuu/config.BuildVersion=${VERSION} -X github.com/assimon/luuu/config.BuildCommit=${COMMIT} -X github.com/assimon/luuu/config.BuildDate=${DATE}" \
-o epusdt .
FROM alpine:latest AS runner