update actions

This commit is contained in:
0g-wh 2024-08-05 16:35:51 +08:00
parent fd4fc4ebb2
commit 72aa6e764b
2 changed files with 4 additions and 3 deletions

View File

@ -7,8 +7,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
LINK_STATICALLY: true
steps:
- uses: actions/checkout@v4
- name: Set up Go
@ -16,7 +14,7 @@ jobs:
with:
go-version: '1.21'
- name: Build
run: sudo make build-release
run: sudo LINK_STATICALLY=true make build-release
- name: Rename file
run: mv ./out/linux/0gchaind ./out/linux/0gchaind-linux-${{ github.ref_name }}
- name: Upload Release Asset

View File

@ -176,6 +176,9 @@ endif
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
ldflags += -w -s
endif
$(info The value of LINK_STATICALLY is: $(LINK_STATICALLY))
ifeq ($(LINK_STATICALLY),true)
ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static -lm"
endif