Skip to content

Commit

Permalink
chore: update goreleaser configuration (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Dec 2, 2024
1 parent eeba613 commit debcdd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 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

0 comments on commit debcdd5

Please sign in to comment.