Skip to content

Commit

Permalink
chore: update goreleaser configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Nov 29, 2024
1 parent eeba613 commit 6f8e68d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
tags:
- v*

env:
GO_VERSION: 1.22
jobs:

GoReeleaser:
Expand All @@ -20,20 +18,11 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/cache@v4
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.golang }}-
go-version: stable

- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v1.18.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
18 changes: 10 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
version: 2

project_name: ireturn

before:
Expand Down Expand Up @@ -50,13 +51,14 @@ changelog:
- Merge branch

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
386: i386
amd64: x86_64
- name_template: >-
{{- .ProjectName }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
{{- if .Mips }}_{{ .Mips }}{{ end -}}
format_overrides:
- goos: windows
format: zip
Expand Down
2 changes: 1 addition & 1 deletion analyzer/std_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func Test_isStdLib(t *testing.T) {
want, name := want, name
t.Run(name, func(t *testing.T) {
got := isStdPkgInterface(name)
assert.Equal(t, got, want,
assert.Equal(t, want, got,
"pkg %s doesn't match expectations (got %v vs want %v)", name, got, want)
})
}
Expand Down

0 comments on commit 6f8e68d

Please sign in to comment.