-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (35 loc) · 1.19 KB
/
force-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: force build
on:
workflow_dispatch:
inputs:
version:
description: 'Type something in here if you want'
required: false
jobs:
gen-csharp:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['6.0.x']
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: |
dotnet new tool-manifest
dotnet tool install --local protobuf-net.Protogen --version 3.1.17
- name: Remove existing generated code
run: rm -rf ./generated/csharp
# recursion doesn't work in protogen so do this instead
- name: generate csharp code
run: find -name '*.proto' | xargs dotnet tool run protogen --csharp_out=./generated/csharp
- name: git commit generated code
run: |
git config --global user.name "autocommit"
git config --global user.email "[email protected]"
git add ./generated/csharp
git commit --allow-empty -a -m "autocommit from CI job"
git push