From 4882c59e7a90b39fa6730172bd907a0232f9cdca Mon Sep 17 00:00:00 2001 From: Michael Rykov Date: Fri, 14 Jun 2024 20:16:18 +0900 Subject: [PATCH] Fixed GoReleaser configuration --- .github/workflows/goreleaser.yml | 10 ++++------ .goreleaser.yml | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index d262fcf..e0b864e 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - name: Install Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache-dependency-path: 'ui/yarn.lock' node-version-file: 'ui/package.json' @@ -32,15 +32,13 @@ jobs: yarn run build - name: Install Go - uses: actions/setup-go@v4 - with: - go-version-file: 'go.mod' + uses: actions/setup-go@v5 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 0aa22f4..4e0d091 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,4 +1,5 @@ project_name: Paperboy +version: 2 builds: - binary: paperboy @@ -8,15 +9,13 @@ builds: - windows goarch: - amd64 - - 386 - - arm - arm64 goarm: - 7 - tags: ['{{ if .Env.BUILD_WITH_UI }}withUI{{ else }}noUI{{ end }}'] - ignore: - - goos: darwin - goarch: 386 + tags: ['{{ if index .Env "BUILD_WITH_UI" }}withUI{{ else }}noUI{{ end }}'] + +universal_binaries: + - replace: true archives: - format: tar.gz @@ -24,20 +23,21 @@ archives: format_overrides: - goos: windows format: zip - replacements: - amd64: 64bit - 386: 32bit - arm: ARM - arm64: ARM64 - darwin: macOS - linux: Linux - windows: Windows + name_template: >- + {{- .ProjectName }}_{{ .Version }}_ + {{- if eq .Os "darwin" }}macOS + {{- else }}{{- title .Os }}{{ end }}_ + {{- if eq .Arch "all" }}universal + {{- else 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' + name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" changelog: - skip: true + disable: true release: draft: true