58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: Generate
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches-ignore: [ main ]
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/go/bin
|
|
~/.cache
|
|
key: livekit-protocol
|
|
|
|
- name: Install Protoc
|
|
uses: arduino/setup-protoc@v1
|
|
with:
|
|
version: '3.19.4'
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- name: Go mod tidy
|
|
run: go mod tidy
|
|
|
|
- name: Install generators
|
|
run: |
|
|
go install github.com/twitchtv/twirp/protoc-gen-twirp@v8.1.0
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
|
|
|
|
- name: Mage Test
|
|
uses: magefile/mage-action@v1
|
|
with:
|
|
version: latest
|
|
args: test
|
|
|
|
- name: Generate Protobuf
|
|
uses: magefile/mage-action@v1
|
|
with:
|
|
version: latest
|
|
args: proto
|
|
|
|
- name: Add changes
|
|
uses: EndBug/add-and-commit@v8
|
|
with:
|
|
add: livekit
|
|
default_author: github_actions
|
|
message: generated protobuf
|