Skip to content

Commit

Permalink
add goreleaser github action to attach simd binary to releases (backp…
Browse files Browse the repository at this point in the history
…ort #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>
  • Loading branch information
mergify[bot] and Carlos Rodriguez authored Jan 20, 2022
1 parent 12f43fb commit 48cb63e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags:
- '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

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

- uses: actions/setup-go@v2
with:
go-version: '1.15'

- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
before:
hooks:
- go mod tidy

builds:
- main: ./testing/simapp/simd/main.go
binary: simd
flags:
- -tags=netgo ledger
- -mod=readonly
ldflags:
- -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"
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
# for goarch use defaults: 386, amd64 and arm64.

checksum:
name_template: SHA256SUMS-{{.Version}}.txt
algorithm: sha256

release:
mode: keep-existing

archives:
- name_template: "{{ .ProjectName }}_simd_v{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
- RELEASES.md
- SECURITY.md
- CHANGELOG.md

0 comments on commit 48cb63e

Please sign in to comment.