Skip to content

Commit

Permalink
Replace replacements with name_template
Browse files Browse the repository at this point in the history
Bump to `goreleaser/goreleaser-action@v5`.

Remove pinned GoReleaser version.

Replaced deprecated `replacements` with a `name_template` to achieve the same output:
cli_0.12.0_windows_x86_64.tar.gz
cli_0.12.0_macOS_arm64.tar.gz
cli_0.12.0_linux_x86_64.tar.gz
cli_0.12.0_macOS_x86_64.tar.gz
cli_0.12.0_linux_arm64.tar.gz
cli_0.12.0_windows_arm64.tar.gz

Signed-off-by: Matthias Diester <[email protected]>
  • Loading branch information
HeavyWombat committed Mar 14, 2024
1 parent 15fc5e8 commit 7fcba66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ jobs:
"${GITHUB_WORKSPACE}/.github/draft_release_notes.sh"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: v1.18.2
args: release --rm-dist --release-notes /tmp/release-notes/Changes.md
args: release --clean --release-notes /tmp/release-notes/Changes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 11 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
before:
hooks:
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
Expand All @@ -17,14 +19,20 @@ builds:
- -s -w -extldflags "-static" -X github.com/shipwright-io/cli/pkg/shp/cmd/version.version={{.Version}}
main: ./cmd/shp/main.go
binary: shp

archives:
- replacements:
darwin: macOS
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end -}}_
{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end -}}
checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
Expand Down

0 comments on commit 7fcba66

Please sign in to comment.