fix: disable cgo

This commit is contained in:
Vincent Young 2023-02-18 20:46:16 +08:00
parent 0532327aed
commit e593bceb97
2 changed files with 7 additions and 25 deletions

View File

@ -3,7 +3,7 @@
# @Author: Vincent Young
# @Date: 2022-10-20 02:19:06
# @LastEditors: Vincent Young
# @LastEditTime: 2022-10-20 09:51:57
# @LastEditTime: 2023-02-18 20:45:52
# @FilePath: /DeepLX/.cross_compile.sh
# @Telegram: https://t.me/missuo
#
@ -29,16 +29,10 @@ for pl in ${PLATFORMS}; do
echo "build => ${TARGET}"
if [ "${DEBUG_MODE}" == "debug" ]; then
go build -trimpath -gcflags "all=-N -l" -o ${TARGET} \
-ldflags "-X 'main.version=${BUILD_VERSION}' \
-X 'main.buildDate=${BUILD_DATE}' \
-X 'main.commitID=${COMMIT_SHA1}'\
-w -s"
CGO_ENABLED=0 go build -trimpath -gcflags "all=-N -l" -o ${TARGET} \
-ldflags "-w -s" main.go
else
go build -trimpath -o ${TARGET} \
-ldflags "-X 'main.version=${BUILD_VERSION}' \
-X 'main.buildDate=${BUILD_DATE}' \
-X 'main.commitID=${COMMIT_SHA1}'\
-w -s"
CGO_ENABLED=0 go build -trimpath -o ${TARGET} \
-ldflags "-w -s" main.go
fi
done

View File

@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: "1.18"
go-version: "1.19"
- run: bash .cross_compile.sh
@ -22,18 +22,6 @@ jobs:
with:
draft: false
files: |
dist/deeplx_darwin_amd64
dist/deeplx_darwin_arm64
dist/deeplx_linux_386
dist/deeplx_linux_amd64
dist/deeplx_linux_arm64
dist/deeplx_linux_armv7
dist/deeplx_linux_mips
dist/deeplx_openbsd_amd64
dist/deeplx_openbsd_arm64
dist/deeplx_freebsd_amd64
dist/deeplx_freebsd_arm64
dist/deeplx_windows_amd64.exe
dist/deeplx_windows_386.exe
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GT_Token }}