Update SDK Proto #628
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Proto Files | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "proto/**" | |
- "devops/*" | |
pull_request: | |
paths: | |
- "proto/**" | |
- "devops/**" | |
- ".github/workflows/build-proto.yml" | |
jobs: | |
compile_proto: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
submodules: recursive | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: pip | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.17 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure git credentials | |
uses: OleksiyRudenko/gha-git-credentials@v2 | |
with: | |
token: '${{ secrets.SDK_REPO_PUSH_TOKEN }}' | |
- uses: trinsic-id/protoc-gen-sdk@main | |
id: buildsdkwrappers | |
with: | |
protoPath: ${{ github.workspace }}/proto | |
dartPath: ${{ github.workspace }}/dart/lib/src | |
dotnetPath: ${{ github.workspace }}/dotnet/Trinsic | |
golangPath: ${{ github.workspace }}/go/services | |
javaKotlinPath: ${{ github.workspace }}/java/src/main/java/trinsic/services | |
pythonPath: ${{ github.workspace }}/python/trinsic | |
typescriptPath: ${{ github.workspace }}/web/src | |
- name: Install protobuf plugins | |
run: | | |
pip install -r ./devops/requirements.txt | |
python ./devops/generate_proto_files.py --download-plugins --language=none | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Compile proto files | |
run: | | |
python ./devops/generate_proto_files.py --language=all | |
- uses: stefanzweifel/git-auto-commit-action@v4 |