From 320690a7b1ecd3fb743af7ffac4eb16412b9e34f Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Sat, 14 May 2022 22:32:16 +0900 Subject: [PATCH] fix not working on centos7 --- .github/workflows/release.yml | 4 ++++ command/.goreleaser.yml | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c0d44b..83f6db0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,10 @@ jobs: run: | sudo apt install gcc-mingw-w64 + - name: Setup musl-tools + run: | + sudo apt-get install musl-tools + - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/command/.goreleaser.yml b/command/.goreleaser.yml index 7de6210..90d5599 100644 --- a/command/.goreleaser.yml +++ b/command/.goreleaser.yml @@ -1,6 +1,7 @@ project_name: tuna env: - GO111MODULE=on + - CGO_ENABLED=1 before: hooks: - go mod tidy @@ -16,7 +17,6 @@ builds: - -X github.com/solaoi/tuna-mayonnaise/cmd.commit={{.FullCommit}} - -X github.com/solaoi/tuna-mayonnaise/cmd.date={{.Date}} env: - - CGO_ENABLED=1 - CC=/home/runner/work/osxcross/target/bin/o64-clang - CXX=/home/runner/work/osxcross/target/bin/o64-clang++ goos: @@ -34,7 +34,6 @@ builds: - -X github.com/solaoi/tuna-mayonnaise/cmd.commit={{.FullCommit}} - -X github.com/solaoi/tuna-mayonnaise/cmd.date={{.Date}} env: - - CGO_ENABLED=1 - CC=x86_64-w64-mingw32-gcc - CXX=x86_64-w64-mingw32-g++ goos: @@ -51,8 +50,9 @@ builds: - -X github.com/solaoi/tuna-mayonnaise/cmd.version={{.Tag}} - -X github.com/solaoi/tuna-mayonnaise/cmd.commit={{.FullCommit}} - -X github.com/solaoi/tuna-mayonnaise/cmd.date={{.Date}} + - -linkmode external -extldflags "-static" env: - - CGO_ENABLED=1 + - CC=musl-gcc goos: - linux goarch: