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