mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
💚 use xgo
This commit is contained in:
parent
8b78cae228
commit
3ceb286f2c
24
.github/workflows/dashboard.yml
vendored
24
.github/workflows/dashboard.yml
vendored
@ -25,17 +25,25 @@ jobs:
|
||||
fi
|
||||
id: extract_branch
|
||||
|
||||
- name: xgoreleaser build
|
||||
run: |
|
||||
docker pull --platform linux/amd64 oryd/xgoreleaser:latest
|
||||
docker run --mount type=bind,source="$(pwd)",target=/project \
|
||||
--platform linux/amd64 \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
--entrypoint goreleaser \
|
||||
oryd/xgoreleaser:latest --skip-publish --snapshot --rm-dist -f .goreleaser.dashboard.yml
|
||||
- name: Build
|
||||
uses: crazy-max/ghaction-xgo@v2
|
||||
with:
|
||||
xgo_version: latest
|
||||
go_version: 1.18
|
||||
dest: build
|
||||
pkg: cmd/dashboard
|
||||
prefix: dashboard
|
||||
targets: linux/amd64,linux/arm64,linux/arm,linux/386,linux/s390x
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
ldflags: -s -w
|
||||
buildmode: default
|
||||
|
||||
- name: move dist
|
||||
run: |
|
||||
ls -al dist
|
||||
tree dist
|
||||
mkdir -p target/linux/{arm,arm64,386,amd64,s390x}
|
||||
mkdir target/linux/arm/v7/
|
||||
mv dist/universal_linux_arm_7/dashboard target/linux/arm/v7/dashboard
|
||||
|
@ -1,25 +0,0 @@
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy -v
|
||||
builds:
|
||||
- id: universal
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
flags:
|
||||
- -tags
|
||||
- sqlite
|
||||
ldflags:
|
||||
- -s -w
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- arm
|
||||
- arm64
|
||||
- amd64
|
||||
- s390x
|
||||
goarm:
|
||||
- 7
|
||||
gomips:
|
||||
- softfloat
|
||||
main: ./cmd/dashboard
|
||||
binary: dashboard
|
Loading…
Reference in New Issue
Block a user