Skip to content

Commit

Permalink
Fix goreleaser configuration (#30)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Norman Gehrsitz <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent 4db1964 commit 9ae8ddb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.13
go-version: 1.21
id: go

- name: Check out code into the Go module directory
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ jobs:
- name: setup go
uses: actions/setup-go@v4
with:
go-version: 1.14
go-version: 1.21
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 0
- name: run GoReleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.21.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
54 changes: 30 additions & 24 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,40 @@ nfpms:
maintainer: "Teppei Fukuda <[email protected]>"
description: "Continuous Benchmark for Go Project"
license: "MIT"
file_name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
file_name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "openbsd" }}OpenBSD
{{- else if eq .Os "netbsd" }}NetBSD
{{- else if eq .Os "freebsd" }}FreeBSD
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
{{- else }}{{ .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else }}{{ .Arch }}{{ end }}
archives:
-
format: tar.gz
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "openbsd" }}OpenBSD
{{- else if eq .Os "netbsd" }}NetBSD
{{- else if eq .Os "freebsd" }}FreeBSD
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
{{- else }}{{ .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else }}{{ .Arch }}{{ end }}
files:
- README.md
- LICENSE
Expand Down

0 comments on commit 9ae8ddb

Please sign in to comment.