-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(goreleaser): fix the failure of goreleaser #10
Conversation
https://github.com/sachaos/toggl/actions/runs/8881061491/job/24382541225 ``` Run goreleaser/goreleaser-action@v1 ✅ GoReleaser version found: v1.25.1 ⬇️ Downloading https://github.com/goreleaser/goreleaser/releases/download/v1.25.1/goreleaser_Linux_x86_64.tar.gz... 📦 Extracting GoReleaser... /usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/28a838f1-afca-4c05-9b9d-f0edb7982e94 -f /home/runner/work/_temp/f0bd4416-ebfb-407a-b04b-b15019c02fb0 ✅ v0.6.0 tag found for commit 'd730e48' 🏃 Running GoReleaser... /opt/hostedtoolcache/goreleaser-action/1.25.1/x64/goreleaser release --rm-dist Flag --rm-dist has been deprecated, please use --clean instead • starting release... ⨯ release failed after 0s error=yaml: unmarshal errors: line 17: field replacements not found in type config.Archive Error: The process '/opt/hostedtoolcache/goreleaser-action/1.25.1/x64/goreleaser' failed with exit code 1 ``` Replace the deprecated field `replacements` with `name_templates`. https://goreleaser.com/deprecations/?h=replacements#nfpmsmaintainer_1
amd64: x86_64 | ||
- name_template: >- | ||
{{- .ProjectName }}_ | ||
{{- .Version }}_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://goreleaser.com/customization/templates/#fn:version-prefix
The v prefix is stripped
- name_template: >- | ||
{{- .ProjectName }}_ | ||
{{- .Version }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name_template keeps the naming format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! LGTM
I noticed the latest release v0.6.0 has no pre built binaries as the release workflow failed.
https://github.com/sachaos/toggl/releases/tag/v0.6.0
https://github.com/sachaos/toggl/actions/runs/8881061491/job/24382541225
To resolve the error, this pull request replaces the deprecated field
replacements
withname_templates
.https://goreleaser.com/deprecations/?h=replacements#nfpmsmaintainer_1