diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index d738124..bf4524d 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master + - run: | + wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz + tar --strip-components=1 -xf upx-3.95-amd64_linux.tar.xz && mv upx /usr/bin/ + upx --version - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 if: startsWith(github.ref, 'refs/tags/') diff --git a/.goreleaser.yml b/.goreleaser.yml index ed700e7..c0a13dd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,6 +3,8 @@ before: - go mod tidy -v builds: - id: nezha-agent + ldflags: + - -s -w env: - CGO_ENABLED=0 goos: @@ -25,6 +27,10 @@ builds: goarch: arm64 main: ./cmd/agent binary: nezha-agent + hooks: + post: + # 为路由器、开发板缩小二进制体积 + - npx --best "{{.Path}}" checksum: name_template: "checksums.txt" snapshot: diff --git a/README.md b/README.md index 8800476..5823025 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。