Skip to content
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

Merged
merged 1 commit into from
May 1, 2024
Merged

chore(goreleaser): fix the failure of goreleaser #10

merged 1 commit into from
May 1, 2024

Conversation

suzuki-shunsuke
Copy link
Contributor

@suzuki-shunsuke suzuki-shunsuke commented May 1, 2024

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

image

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

To resolve the error, this pull request replaces the deprecated field replacements with name_templates.

https://goreleaser.com/deprecations/?h=replacements#nfpmsmaintainer_1

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 }}_
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +17 to +23
- name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end -}}
Copy link
Contributor Author

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.

https://github.com/sachaos/toggl/releases/tag/v0.5.1

@suzuki-shunsuke suzuki-shunsuke marked this pull request as ready for review May 1, 2024 02:37
Copy link
Owner

@sachaos sachaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@sachaos sachaos merged commit 967a0cb into sachaos:master May 1, 2024
@suzuki-shunsuke suzuki-shunsuke deleted the chore-fix-goreleaser branch May 1, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants