From 425bf2dd0d98f10404d0b80174fcd3c329368c71 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 29 Aug 2025 14:36:28 +0200 Subject: [PATCH] add ci --- .woodpecker/build.yaml | 16 ++++++++++++++++ Makefile | 6 ++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .woodpecker/build.yaml diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml new file mode 100644 index 0000000..987d274 --- /dev/null +++ b/.woodpecker/build.yaml @@ -0,0 +1,16 @@ +steps: + "Build assets": + when: + event: [push, pull_request, tag, manual] + image: image: node:20-alpine + commands: + - npm i + - make front + + "Build go": + when: + event: [push, pull_request, tag, manual] + image: golang:1.25-bookworm + commands: + - go mod vendor + - make binary diff --git a/Makefile b/Makefile index ef3887c..fdbbf03 100644 --- a/Makefile +++ b/Makefile @@ -24,11 +24,13 @@ lint: npm run lint || true npm run format -.PHONY: -build: front rice +binary: rice CGO_ENABLED=$(CGO_ENABLED) \ GOARCH=$(GO_ARCH_AMD) \ GOOS=$(GO_OS_LINUX) \ $(CC) $(CFLAGS) -ldflags="$(LDFLAGS)" \ -tags=static_build \ -o $(EXECUTABLE_SERVER) ./cmd/server + +.PHONY: +build: front binary