forked from strangelove-ventures/horcrux
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.51 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: "Release"
on:
push:
branches:
- "RC[0-9]/**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: '1.19'
# TODO:figure out how to add the supported SDK and tendermint versions
# here we need to run the following and save the results to ENV in the goreleaser action
# SDKVERSION := $(shell go list -m -u -f '{{.Version}}' github.com/cosmos/cosmos-sdk)
# TMVERSION := $(shell go list -m -u -f '{{.Version}}' github.com/tendermint/tendermint)
# Also see .goreleaser.yaml to wire up the environment variables
- run: echo ":rocket::rocket::rocket:" > ../release_notes.md
if: startsWith(github.ref, 'refs/tags/')
- name: Build
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist --release-notes=../release_notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}