From b0ff4327038ebd8fd598227e2bedfb41f86ae276 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 15 Feb 2023 23:24:02 +0100 Subject: [PATCH] chore: disable CGO and upgrade goreleaser --- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- .goreleaser-nightly.yml | 8 +++++--- .goreleaser.yml | 7 +++++-- Makefile | 4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6eb391a0f..b71ea6a57 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -102,7 +102,7 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: version: latest - args: --snapshot -f .goreleaser-nightly.yml --rm-dist + args: --snapshot -f .goreleaser-nightly.yml --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e24e0799a..3ea75a03f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: version: latest - args: release --rm-dist + args: release --clean env: # use GH_TOKEN for access to evcc-io/homebrew-tap GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.goreleaser-nightly.yml b/.goreleaser-nightly.yml index 64441b6a8..22387e808 100644 --- a/.goreleaser-nightly.yml +++ b/.goreleaser-nightly.yml @@ -26,15 +26,17 @@ builds: archives: - builds: - evcc - replacements: - darwin: macOS format: tar.gz format_overrides: - goos: windows format: zip files: - evcc.dist.yaml - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}-{{ .Arch }}{{ if .Arm }}hf{{ end }}" + name_template: >- + {{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}-{{ .Arch }}{{ if .Arm }}hf{{ end }} + +env: + - CGO_ENABLED=0 universal_binaries: - replace: true diff --git a/.goreleaser.yml b/.goreleaser.yml index 381e67d86..5b4b477df 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -27,17 +27,20 @@ builds: - goos: windows goarch: arm64 +env: + - CGO_ENABLED=0 + archives: - builds: - evcc - replacements: - darwin: macOS format: tar.gz format_overrides: - goos: windows format: zip files: - evcc.dist.yaml + name_template: >- + {{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}-{{ .Arch }}{{ if .Arm }}hf{{ end }} universal_binaries: - replace: true diff --git a/Makefile b/Makefile index 80537063e..c018d14a7 100644 --- a/Makefile +++ b/Makefile @@ -75,10 +75,10 @@ build:: CGO_ENABLED=0 go build -v $(BUILD_TAGS) $(BUILD_ARGS) snapshot: - goreleaser --snapshot --skip-publish --rm-dist + goreleaser --snapshot --skip-publish --clean release:: - goreleaser --rm-dist + goreleaser --clean docker:: @echo Version: $(VERSION) $(SHA) $(BUILD_DATE)