-
Notifications
You must be signed in to change notification settings - Fork 170
53 lines (48 loc) · 1.86 KB
/
release-umee.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
48
49
50
51
52
53
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+" # Official release version tags e.g. v2.0.5
- "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" # Release candidate tags e.g. v1.0.3-rc4
- "v[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+" # Beta releases tags e.g. v4.3.0-beta1
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.20"
cache: true
- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV
# useful to test builds. However will require to add "push" rule to the "on" section
- name: generate and update swagger docs
run: |
make proto-swagger-gen
make proto-update-swagger-docs
- name: goreleaser test-build
uses: goreleaser/goreleaser-action@v5
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Enable:ReleaseBuild')
with:
version: latest
args: build --rm-dist --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
env:
TM_VERSION: ${{ env.TM_VERSION }}
- name: Release
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TM_VERSION: ${{ env.TM_VERSION }}