mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-03-22 02:51:50 +00:00
[ci][docker]: use matrix to reduce build time & change base image to busybox (#417)
* ci: use matrix to reduce build time * docker: change base image to busybox * reuse workflows * only download ipinfo db on tag pushes * goreleaser
This commit is contained in:
71
.goreleaser.yml
Normal file
71
.goreleaser.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
version: 2
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy -v
|
||||
builds:
|
||||
- id: linux_arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
|
||||
- -extldflags "-static -fpic"
|
||||
flags:
|
||||
- -trimpath
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- arm64
|
||||
main: ./cmd/dashboard
|
||||
binary: dashboard-{{ .Os }}-{{ .Arch }}
|
||||
- id: linux_amd64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
- CC=x86_64-linux-gnu-gcc
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
|
||||
- -extldflags "-static -fpic"
|
||||
flags:
|
||||
- -trimpath
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
main: ./cmd/dashboard
|
||||
binary: dashboard-{{ .Os }}-{{ .Arch }}
|
||||
- id: linux_s390x
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
- CC=s390x-linux-gnu-gcc
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
|
||||
- -extldflags "-static -fpic"
|
||||
flags:
|
||||
- -trimpath
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- s390x
|
||||
main: ./cmd/dashboard
|
||||
binary: dashboard-{{ .Os }}-{{ .Arch }}
|
||||
- id: windows_amd64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
- CC=x86_64-w64-mingw32-gcc
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X github.com/naiba/nezha/service/singleton.Version={{.Version}}
|
||||
- -extldflags "-static -fpic"
|
||||
flags:
|
||||
- -trimpath
|
||||
goos:
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
main: ./cmd/dashboard
|
||||
binary: dashboard-{{ .Os }}-{{ .Arch }}
|
||||
snapshot:
|
||||
version_template: "dashboard"
|
||||
Reference in New Issue
Block a user