Skip to content

Commit 998fd4b

Browse files
committed
add: 减少二进制文件大小
1 parent 7892fbd commit 998fd4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/go.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ jobs:
2828
goversion: 1.24
2929
md5sum: false
3030
overwrite: true
31+
executable_compression: upx
3132
asset_name: go-v2ex-${{ matrix.goos }}-${{ matrix.goarch }}
32-
ldflags: -X "main.appVersion=${{ env.APP_VERSION }}"
33+
pre_command: export CGO_ENABLED=0
34+
ldflags: -s -w -extldflags -static -X "main.appVersion=${{ env.APP_VERSION }}"

0 commit comments

Comments
 (0)