diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..49318373f99 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000000..a1df128c661 --- /dev/null +++ b/.goreleaser.yml @@ -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 \ No newline at end of file