diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 19b2d91..2d70bfa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,6 +20,6 @@ jobs: with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0551e9f..7f2423b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,5 @@ +version: 2 + project_name: eol release: prerelease: auto @@ -15,14 +17,22 @@ builds: - -s -w - -X main.Version={{.Version}} - -X main.Revision={{.ShortCommit}} + goos: + - linux + - windows + - darwin + archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - replacements: - darwin: darwin - linux: linux - windows: windows - 386: i386 - amd64: x86_64 + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + 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 }} + # use zip for windows archives format_overrides: - goos: windows format: zip diff --git a/pkg/commands/version.go b/pkg/commands/version.go index a1952bc..4f26318 100644 --- a/pkg/commands/version.go +++ b/pkg/commands/version.go @@ -4,7 +4,7 @@ import ( "fmt" ) -const version = "v0.1.0" +const version = "v0.2.0" // RunVersion shows the current version func RunVersion() { diff --git a/pkg/commands/version_test.go b/pkg/commands/version_test.go index 8619fda..7482bb8 100644 --- a/pkg/commands/version_test.go +++ b/pkg/commands/version_test.go @@ -9,7 +9,7 @@ import ( func TestRunVersion(t *testing.T) { out := capture(RunVersion) - if out != "v0.1.0" { + if out != "v0.2.0" { t.Errorf("unexpected output: %s", out) } }