forked from drand/drand
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.68 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
48
49
50
51
52
53
name: goreleaser
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected]
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected]
with:
go-version: '1.19.5'
- name: Install Protoc
uses: arduino/setup-protoc@ab6203da1c3118e4406048171b09238ad31ad73e # [email protected]
with:
version: '3.19.6'
- name: Install Protoc-gen-go
run: |
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go mod tidy
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@d681662789c541f0777208c1f0e82f255f70b28d # [email protected]
- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 # [email protected]
with:
input_string: ${{ steps.get_version.outputs.version }}
version_extractor_regex: 'v(.*)$'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@8f67e590f2d095516493f017008adc464e63adb1 # [email protected]
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAJOR: ${{ steps.semver_parser.outputs.major }}
MINOR: ${{ steps.semver_parser.outputs.minor }}
PATCH: ${{ steps.semver_parser.outputs.patch }}