This commit is contained in:
parent
bc2a4b3453
commit
b8ad31e366
|
@ -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]
|
||||
|
|
14
Makefile
14
Makefile
|
@ -1,8 +1,16 @@
|
|||
all: linux-amd64 linux-arm64
|
||||
|
||||
.ONESHELL:
|
||||
all:
|
||||
linux-amd64:
|
||||
for i in blocks/*; do
|
||||
go build -ldflags '-s -w' -v -o "build/$$(basename "$$i")" "$$i/main.go"
|
||||
GOARCH=amd64 GOOS=linux go build -ldflags '-s -w' -v -o "build/linux-amd64/$$(basename "$$i")" "$$i/main.go"
|
||||
done
|
||||
|
||||
.ONESHELL:
|
||||
linux-arm64:
|
||||
for i in blocks/*; do
|
||||
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…
Reference in a new issue