From 7ba20159715d2220ddc0fe7a5ab307e6b9e13465 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 13 Sep 2023 09:53:19 -0700 Subject: [PATCH 1/3] fix(ci): enable cgo for macOS keychain support --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8c25e48f..c80564db3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,7 @@ jobs: version: latest args: release --clean --config .goreleaser.${{ matrix.os }}.yml env: + CGO_ENABLED: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} IMAGE_NAME: ${{ env.REPOSITORY_NAME_LOWERCASE }} From 2753bd533a9d1a80f27eb14e551cdaec32c3a7cc Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 13 Sep 2023 10:15:19 -0700 Subject: [PATCH 2/3] Be consistent --- .github/workflows/go.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f6fd875a7..744aedf7e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -102,6 +102,8 @@ jobs: with: version: latest args: build --snapshot --clean --config .goreleaser.${{ matrix.os }}.yml + env: + CGO_ENABLED: 1 - name: Upload uses: actions/upload-artifact@v3 From 19b54f18890ac675faefc6fcd28a00eef49301c2 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 13 Sep 2023 10:24:49 -0700 Subject: [PATCH 3/3] Set CGO_ENABLED as appropriate in the goreleaser config --- .github/workflows/go.yml | 2 -- .github/workflows/release.yml | 1 - .goreleaser.macos-latest.yml | 2 ++ .goreleaser.ubuntu-latest.yml | 3 +++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 744aedf7e..f6fd875a7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -102,8 +102,6 @@ jobs: with: version: latest args: build --snapshot --clean --config .goreleaser.${{ matrix.os }}.yml - env: - CGO_ENABLED: 1 - name: Upload uses: actions/upload-artifact@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c80564db3..a8c25e48f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,6 @@ jobs: version: latest args: release --clean --config .goreleaser.${{ matrix.os }}.yml env: - CGO_ENABLED: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} IMAGE_NAME: ${{ env.REPOSITORY_NAME_LOWERCASE }} diff --git a/.goreleaser.macos-latest.yml b/.goreleaser.macos-latest.yml index de65cbc4a..7eb698be5 100644 --- a/.goreleaser.macos-latest.yml +++ b/.goreleaser.macos-latest.yml @@ -15,6 +15,8 @@ builds: - amd64 - arm64 - arm + env: + - CGO_ENABLED=1 archives: - format: tar.gz wrap_in_directory: false diff --git a/.goreleaser.ubuntu-latest.yml b/.goreleaser.ubuntu-latest.yml index 5db45000c..a196033ff 100644 --- a/.goreleaser.ubuntu-latest.yml +++ b/.goreleaser.ubuntu-latest.yml @@ -22,6 +22,9 @@ builds: goamd64: v1 env: - CGO_ENABLED=0 + - goos: windows + env: + - CGO_ENABLED=0 archives: - format: tar.gz wrap_in_directory: false