update ci

main
Simon Vieille 3 weeks ago
parent bc2a4b3453
commit b8ad31e366
Signed by: deblan
GPG Key ID: 579388D585F70417
  1. 5
      .woodpecker.yml
  2. 14
      Makefile

@ -8,6 +8,9 @@ pipeline:
image: golang:1.18
commands:
- make
- mkdir release
- tar cz release/build-amd64.tar.gz build/linux-amd64/
- tar cz release/build-arm64.tar.gz build/linux-arm64/
release:
image: plugins/gitea-release
@ -16,6 +19,6 @@ pipeline:
from_secret: gitnet_api_key
base_url: https://gitnet.fr
note:
files: build/*
files: release/*
when:
event: [tag]

@ -1,8 +1,16 @@
all: linux-amd64 linux-arm64
.ONESHELL:
linux-amd64:
for i in blocks/*; do
GOARCH=amd64 GOOS=linux go build -ldflags '-s -w' -v -o "build/linux-amd64/$$(basename "$$i")" "$$i/main.go"
done
.ONESHELL:
all:
linux-arm64:
for i in blocks/*; do
go build -ldflags '-s -w' -v -o "build/$$(basename "$$i")" "$$i/main.go"
GOARCH=arm64 GOOS=linux go build -ldflags '-s -w' -v -o "build/linux-arm64/$$(basename "$$i")" "$$i/main.go"
done
clean:
rm build/* 2>/dev/null || true
rm -fr build/* 2>/dev/null || true

Loading…
Cancel
Save