fork/rust-sdks

git clone https://git.julia.blue/fork/rust-sdks

Théo Monnomfix livekit-protocol generation (#442)f675ef8

main
1.6 KiB63 linesraw
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
15name: Generate protocol
16
17on:
18  pull_request:
19    branches: ["main"]
20    paths:
21      - livekit-protocol/**
22
23env:
24  CARGO_TERM_COLOR: always
25  PACKAGE_DIR: ./livekit-protocol
26
27jobs:
28  generate_protobuf:
29    runs-on: ubuntu-latest
30    name: Generating protobuf
31
32    defaults:
33      run:
34        working-directory: ${{ env.PACKAGE_DIR }}
35
36    steps:
37      - uses: actions/checkout@v4
38        with:
39          submodules: true
40          ref: ${{ github.event.pull_request.head.ref }}
41
42      - uses: actions-rs/toolchain@v1
43        with:
44          toolchain: stable
45
46      - name: Install Protoc
47        uses: arduino/setup-protoc@v2
48        with:
49          version: "25.2"
50          repo-token: ${{ secrets.GITHUB_TOKEN }}
51
52      - name: Install prost generators
53        run: cargo install protoc-gen-prost@0.3.1 protoc-gen-prost-serde@0.3.1
54
55      - name: generate python stubs
56        run: ./generate_proto.sh
57
58      - name: Add changes
59        uses: EndBug/add-and-commit@v9
60        with:
61          add: '["livekit-protocol/"]'
62          default_author: github_actions
63          message: generated protobuf