github.com/livekit/protocol@v1.16.1-0.20240517185851-47e4c6bba773/.github/workflows/generate.yaml (about) 1 # Copyright 2023 LiveKit, Inc. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 name: Generate 16 17 on: 18 workflow_dispatch: 19 push: 20 branches-ignore: [main] 21 22 jobs: 23 generate: 24 runs-on: ubuntu-latest 25 steps: 26 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 27 28 - name: Install Protoc 29 uses: arduino/setup-protoc@v2 30 with: 31 repo-token: ${{ secrets.GITHUB_TOKEN }} 32 33 - name: Set up Go 34 uses: actions/setup-go@v5 35 with: 36 go-version: ">=1.20" 37 38 - name: Go mod tidy 39 run: go mod tidy 40 41 - name: Install generators 42 uses: magefile/mage-action@v3 43 with: 44 version: latest 45 install-only: true 46 47 - name: Bootstrap 48 run: mage bootstrap 49 50 - name: Generate Protobuf 51 run: mage proto 52 53 - uses: pnpm/action-setup@v2 54 with: 55 version: 8 56 57 - name: Use Node.js 20 58 uses: actions/setup-node@v4 59 with: 60 node-version: 20 61 cache: "pnpm" 62 63 - name: Install JS dependencies 64 run: pnpm install 65 66 - name: Test generate JS files 67 run: | 68 pnpm --filter @livekit/protocol run generate:proto 69 70 - name: Add changes 71 uses: EndBug/add-and-commit@v9 72 with: 73 add: '["livekit", "rpc", "infra"]' 74 default_author: github_actions 75 message: generated protobuf