2020-04-08 22:44:13 +00:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Set up Go 1.14
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.14.x
|
|
|
|
id: go
|
|
|
|
|
2020-05-06 22:45:37 +00:00
|
|
|
- name: Install Protoc
|
|
|
|
uses: arduino/setup-protoc@master
|
|
|
|
with:
|
|
|
|
version: '3.x'
|
|
|
|
|
2020-04-08 22:44:13 +00:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
2020-06-15 11:01:37 +00:00
|
|
|
with:
|
|
|
|
lfs: true
|
2020-05-06 22:45:37 +00:00
|
|
|
|
|
|
|
- name: Install mockgen
|
|
|
|
run: go get -u github.com/golang/mock/mockgen@latest
|
|
|
|
|
|
|
|
- name: Install protoc-gen-go
|
|
|
|
run: go install github.com/golang/protobuf/protoc-gen-go
|
2020-04-08 22:44:13 +00:00
|
|
|
|
|
|
|
- name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
|
|
|
|
|
|
|
- name: Build & test
|
|
|
|
run: make
|
|
|
|
|
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v1
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
key: ${{ secrets.YOUR_PRIVATE_KEY }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|