Skip to content

Commit

Permalink
feat: Improvement for GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord committed May 12, 2023
1 parent dcc244a commit 5c61222
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 83 deletions.
64 changes: 0 additions & 64 deletions .goreleaser-darwin.yml

This file was deleted.

66 changes: 47 additions & 19 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,48 @@ builds:
- -X github.com/ledger/ledger/cmd.Commit={{ .ShortCommit }}
- -X github.com/ledger/ledger/cmd.DefaultSegmentWriteKey={{ .Env.SEGMENT_WRITE_KEY }}
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
flags:
- -tags=json1
- binary: ledger
id: ledger_linux_amd64
id: ledger_linux
ldflags:
- -X github.com/ledger/ledger/cmd.BuildDate={{ .Date }}
- -X github.com/ledger/ledger/cmd.Version={{ .Version }}
- -X github.com/ledger/ledger/cmd.Commit={{ .ShortCommit }}
- -X github.com/ledger/ledger/cmd.DefaultSegmentWriteKey={{ .Env.SEGMENT_WRITE_KEY }}
- -extldflags "-static"
env:
- CGO_ENABLED=1
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
flags:
- -tags=json1,netgo
- arm64
- binary: ledger
id: ledger_linux_arm64
id: ledger_darwin
ldflags:
- -X github.com/ledger/ledger/cmd.BuildDate={{ .Date }}
- -X github.com/ledger/ledger/cmd.Version={{ .Version }}
- -X github.com/ledger/ledger/cmd.Commit={{ .ShortCommit }}
- -X github.com/ledger/ledger/cmd.DefaultSegmentWriteKey={{ .Env.SEGMENT_WRITE_KEY }}
- -extldflags "-static"
- -s
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
flags:
- -tags=json1,netgo

archives:
- id: "ledger"
builds:
- ledger_linux_amd64
- ledger_linux_arm64
- ledger_linux
- ledger_windows
- ledger_darwin
format: tar.gz
format_overrides:
- goos: windows
Expand All @@ -74,13 +68,47 @@ archives:
linux: Linux
windows: Windows

checksum:
name_template: '{{.ProjectName}}_checksums.txt'

snapshot:
name_template: "{{ .Tag }}"

changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^spec:'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: 'New Features'
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 10
- title: Other work
order: 999

release:
prerelease: auto
footer: |
## What to do next?
- Read the [documentation](https://docs.formance.com/)
- Join our [Slack server](https://formance.com/slack)
nfpms:
- id: packages
package_name: ledger
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- ledger_linux_amd64
- ledger_linux_arm64
- ledger_linux
homepage: https://formance.com
maintainer: Maxence Maireaux <[email protected]>
formats:
Expand Down

0 comments on commit 5c61222

Please sign in to comment.