-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): Add goreleaser to ship binaries
- Loading branch information
1 parent
4af3989
commit f53d46a
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
# run only against tags | ||
#tags: | ||
# - '*' | ||
branches: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
# packages: write | ||
# issues: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Fetch all tags | ||
run: git fetch --force --tags | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.21 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
project_name: berad | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
- go mod download | ||
|
||
builds: | ||
- <<: &build_defaults | ||
# Custom flags templates. | ||
flags: | ||
- -trimpath | ||
tags: | ||
- netgo | ||
- ledger | ||
- muslc | ||
ldflags: | ||
- -s -w -linkmode=external -extldflags '-Wl,-z,muldefs -static' -X github.com/cosmos/cosmos-sdk/version.Name=beacond -X github.com/cosmos/cosmos-sdk/version.AppName=beacond -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags='netgo,ledger,muslc -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb' | ||
env: | ||
- CGO_ENABLED=0 | ||
- GOPRIVATE="github.com/berachain" | ||
goos: [ darwin, linux, windows ] | ||
goarch: [amd64, arm64] # add arm64 and 386 arch if necessary | ||
id: berad | ||
binary: berad | ||
main: ./cmd/berad | ||
|
||
archives: | ||
- <<: &archive_defaults | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
id: ldgctl | ||
builds: [ ldgctl ] | ||
name_template: "ldgctl_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- Merge pull request | ||
- Merge branch | ||
- go mod tidy |