From 4863a88228a176eaeaf2083d2c6cf50bedfc4b4b Mon Sep 17 00:00:00 2001 From: itchyny Date: Tue, 11 Jun 2024 05:25:04 +0900 Subject: [PATCH] chore: fix CI to follow the deprecation of goreleaser flags (#755) * chore: fix CI to follow the deprecation of goreleaser flags * chore: fix goreleaser config file to follow deprecation notice --- .github/workflows/ci.yml | 2 +- .goreleaser.yml | 35 +++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 675cc76..c3f8187 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,4 +97,4 @@ jobs: - uses: actions/checkout@v2 - uses: goreleaser/goreleaser-action@v2 with: - args: release --snapshot --skip-publish --rm-dist + args: release --snapshot --skip=publish --clean diff --git a/.goreleaser.yml b/.goreleaser.yml index 4faaaf0..c9cd838 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json + +version: 2 builds: - env: @@ -9,13 +10,13 @@ builds: - windows - darwin goarch: - - 386 + - "386" - amd64 - arm - arm64 ignore: - goos: darwin - goarch: 386 + goarch: "386" id: jsonnet main: ./cmd/jsonnet @@ -30,13 +31,13 @@ builds: - windows - darwin goarch: - - 386 + - "386" - amd64 - arm - arm64 ignore: - goos: darwin - goarch: 386 + goarch: "386" id: jsonnetfmt main: ./cmd/jsonnetfmt @@ -49,13 +50,13 @@ builds: - windows - darwin goarch: - - 386 + - "386" - amd64 - arm - arm64 ignore: - goos: darwin - goarch: 386 + goarch: "386" id: jsonnet-lint main: ./cmd/jsonnet-lint @@ -68,13 +69,13 @@ builds: - windows - darwin goarch: - - 386 + - "386" - amd64 - arm - arm64 ignore: - goos: darwin - goarch: 386 + goarch: "386" id: jsonnet-deps main: ./cmd/jsonnet-deps @@ -82,12 +83,14 @@ builds: archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - name_template: >- + {{- .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end -}} + checksum: name_template: "checksums.txt"