Skip to content

Commit 48cb63e

Browse files
add goreleaser github action to attach simd binary to releases (backport #738) (#765)
* add goreleaser github action to attach simd binary to releases and pre-releases (#738) Co-authored-by: Carlos Rodriguez <crodveg@gmail.com> (cherry picked from commit 87b058d) * Update release.yml Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
1 parent 12f43fb commit 48cb63e

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/release.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+-?[a-z0-9]*' # Push events to matching v*, i.e. v1.0.0, v20.15.10, v3.0.0-alpha1
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2.4.0
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-go@v2
18+
with:
19+
go-version: '1.15'
20+
21+
- name: Release
22+
uses: goreleaser/goreleaser-action@v2
23+
if: startsWith(github.ref, 'refs/tags/')
24+
with:
25+
version: latest
26+
args: release --rm-dist
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- main: ./testing/simapp/simd/main.go
7+
binary: simd
8+
flags:
9+
- -tags=netgo ledger
10+
- -mod=readonly
11+
ldflags:
12+
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- windows
18+
- darwin
19+
# for goarch use defaults: 386, amd64 and arm64.
20+
21+
checksum:
22+
name_template: SHA256SUMS-{{.Version}}.txt
23+
algorithm: sha256
24+
25+
release:
26+
mode: keep-existing
27+
28+
archives:
29+
- name_template: "{{ .ProjectName }}_simd_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
30+
files:
31+
- LICENSE
32+
- README.md
33+
- RELEASES.md
34+
- SECURITY.md
35+
- CHANGELOG.md

0 commit comments

Comments
 (0)