github.com/livekit/protocol@v1.39.3/.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@v4 54 55 - name: Use Node.js 20 56 uses: actions/setup-node@v4 57 with: 58 node-version: 20 59 cache: "pnpm" 60 61 - name: Install JS dependencies 62 run: pnpm install 63 64 - name: Test generate JS files 65 run: | 66 pnpm --filter @livekit/protocol run generate:proto 67 68 - name: Add changes 69 uses: EndBug/add-and-commit@v9 70 with: 71 add: '["livekit", "rpc", "infra", "packages/javascript/src/gen"]' 72 default_author: github_actions 73 message: generated protobuf