From 72aa6e764b446d6b40c4fd430e5b64ef04eaa5e6 Mon Sep 17 00:00:00 2001
From: 0g-wh <wenhui.xing@0g.ai>
Date: Mon, 5 Aug 2024 16:35:51 +0800
Subject: [PATCH] update actions

---
 .github/workflows/upload-release-assets.yml | 4 +---
 Makefile                                    | 3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/upload-release-assets.yml b/.github/workflows/upload-release-assets.yml
index d45bc47c..29e9e260 100644
--- a/.github/workflows/upload-release-assets.yml
+++ b/.github/workflows/upload-release-assets.yml
@@ -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
diff --git a/Makefile b/Makefile
index 6079aca4..3db8fb06 100644
--- a/Makefile
+++ b/Makefile
@@ -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