Skip to content

Commit

Permalink
Update goreleaser.yml for archives.replacements removal
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-suhas committed Oct 18, 2023
1 parent c59089b commit 7bbc766
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 10 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ builds:
ldflags:
- -X main.Version={{.Version}}
archives:
- replacements:
darwin: macOS
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: >-
{{- .ProjectName }}_
{{- if eq .Os "darwin"}}macOS
{{- else if eq .Os "linux"}}Linux
{{- else if eq .Os "windows"}}Windows
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
universal_binaries:
- replace: false
checksum:
Expand Down
4 changes: 2 additions & 2 deletions releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ $ git push origin v0.1.0
Then:

```bash
GITHUB_TOKEN=xxx goreleaser --rm-dist
GITHUB_TOKEN=xxx goreleaser --clean
```

## Testing

To test and verify changes to Go Releaser config, use the following:

```bash
goreleaser --snapshot --skip-publish --rm-dist
goreleaser --snapshot --skip=publish --clean
```

0 comments on commit 7bbc766

Please sign in to comment.