diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 53f621c..433fdf3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,8 +5,6 @@ on: tags: - v* -env: - GO_VERSION: 1.22 jobs: GoReeleaser: @@ -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 }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 046c2f2..f80c4b8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,4 +1,5 @@ ---- +version: 2 + project_name: ireturn before: @@ -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