Skip to content

Commit

Permalink
let goreleaser also build debug file (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwinger233 authored Dec 22, 2021
1 parent e160ade commit 089fae7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
34 changes: 32 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,46 @@ before:
- go mod download

builds:
- binary: eru-core
- id: eru-core-debug
binary: eru-core.dbg
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X github.com/projecteru2/core/version.REVISION={{.Commit}}
- -X github.com/projecteru2/core/version.VERSION={{.Env.VERSION}}
- -X github.com/projecteru2/core/version.BUILTAT={{.Date}}
hooks:
post:
- cp {{.Path}} ./eru-core-{{.Os}}.dbg
goos:
- darwin
- linux
goarch:
- amd64

# the best practice is using prebuilt builder
# however it's a Pro feature
- id: eru-core-linux
binary: eru-core
hooks:
post:
- cp ./eru-core-{{.Os}}.dbg {{.Path}}
- strip {{.Path}}
goos:
- linux
goarch:
- amd64

- id: eru-core-darwin
binary: eru-core
env:
- CGO_ENABLED=0
ldflags:
- -w -s
- -X github.com/projecteru2/core/version.REVISION={{.Commit}}
- -X github.com/projecteru2/core/version.VERSION={{.Env.VERSION}}
- -X github.com/projecteru2/core/version.BUILTAT={{.Date}}
goos:
- darwin
goarch:
- amd64
Expand Down

0 comments on commit 089fae7

Please sign in to comment.