📦 static link
This commit is contained in:
parent
b0b7e9da61
commit
a823da1f29
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
ldflags: -s -w -X github.com/naiba/nezha/service/singleton.Version=${{ steps.extract_branch.outputs.tag }}
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=${{ steps.extract_branch.outputs.tag }}
|
||||
buildmode: default
|
||||
|
||||
- name: fix dist
|
||||
|
18
.github/workflows/test-on-pr.yml
vendored
18
.github/workflows/test-on-pr.yml
vendored
@ -17,10 +17,22 @@ jobs:
|
||||
- name: Unit test
|
||||
run: |
|
||||
go test -v ./...
|
||||
- name: Build test
|
||||
run: |
|
||||
go build cmd/dashboard/main.go
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: --exclude=G104,G402 ./...
|
||||
- name: xgo build
|
||||
uses: crazy-max/ghaction-xgo@v2
|
||||
with:
|
||||
xgo_version: latest
|
||||
go_version: 1.21
|
||||
dest: dist
|
||||
pkg: cmd/dashboard
|
||||
prefix: dashboard
|
||||
targets: linux/amd64,linux/arm64,linux/arm-7,linux/s390x,linux/riscv64 # linux/386,
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||
buildmode: default
|
||||
|
||||
|
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
@ -26,10 +26,21 @@ jobs:
|
||||
- name: Unit test
|
||||
run: |
|
||||
go test -v ./...
|
||||
- name: Build test
|
||||
run: |
|
||||
go build cmd/dashboard/main.go
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: --exclude=G104,G402 ./...
|
||||
- name: xgo build
|
||||
uses: crazy-max/ghaction-xgo@v2
|
||||
with:
|
||||
xgo_version: latest
|
||||
go_version: 1.21
|
||||
dest: dist
|
||||
pkg: cmd/dashboard
|
||||
prefix: dashboard
|
||||
targets: linux/amd64,linux/arm64,linux/arm-7,linux/s390x,linux/riscv64 # linux/386,
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
ldflags: -s -w --extldflags '-static -fpic' -X github.com/naiba/nezha/service/singleton.Version=test
|
||||
buildmode: default
|
||||
|
Loading…
x
Reference in New Issue
Block a user