File tree Expand file tree Collapse file tree 6 files changed +479
-2
lines changed Expand file tree Collapse file tree 6 files changed +479
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build C# Package
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ buildJavaScript :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v3
11
+
12
+ - uses : actions/download-artifact@v3
13
+ with :
14
+ name : json-schema
15
+ path : packages/csharp
16
+
17
+ - uses : actions/setup-node@v3
18
+ name : Setup Node
19
+
20
+ - name : Install Dependencies
21
+ run : npm install quicktype --save
22
+
23
+ - name : Create Typescript
24
+ run : npx quicktype --src packages/csharp/lcax.schema.json --lang csharp --out packages/csharp/lcax.cs --namespace LCAx --features just-types
25
+
26
+ - name : Upload C#
27
+ uses : actions/upload-artifact@v3
28
+ with :
29
+ name : csharp-schema
30
+ path : ' packages/lcax/lcax.cs'
Original file line number Diff line number Diff line change 34
34
needs :
35
35
- buildRust
36
36
37
+ buildCSharp :
38
+ uses : ./.github/workflows/build_csharp.yaml
39
+ needs :
40
+ - buildRust
41
+
37
42
createRelease :
38
43
if : github.event_name != 'pull_request'
39
44
uses : ./.github/workflows/create_release.yaml
64
69
needs :
65
70
- createRelease
66
71
secrets :
67
- npm_token : ${{ secrets.NPM_TOKEN }}
72
+ npm_token : ${{ secrets.NPM_TOKEN }}
73
+
74
+ publishCSharp :
75
+ if : (github.event_name != 'pull_request') && ${{ needs.createRelease.output.version != '' }}
76
+ uses : ./.github/workflows/publish_csharp.yaml
77
+ needs :
78
+ - createRelease
79
+ with :
80
+ version : ${{ needs.createRelease.output.version }}
81
+ secrets :
82
+ nuget_token : ${{ secrets.NUGET_TOKEN }}
Original file line number Diff line number Diff line change
1
+
2
+ name : Publish NuGet Package
3
+
4
+ on :
5
+ workflow_call :
6
+ inputs :
7
+ version :
8
+ type : string
9
+ required : true
10
+ secrets :
11
+ nuget_token :
12
+ required : true
13
+
14
+ jobs :
15
+ publishJavaScript :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+
20
+ - uses : actions/download-artifact@v3
21
+ with :
22
+ name : csharp-schema
23
+ path : packages/csharp/lcax
24
+
25
+ - name : Setup dotnet
26
+ uses : actions/setup-dotnet@v3
27
+ with :
28
+ dotnet-version : ' 7.0.x'
29
+
30
+ - name : Install dependencies
31
+ run : dotnet restore
32
+
33
+ - name : Bump Version
34
+ run : sed -i "s/\(<Version>\)\([0-9]\.*\)\{3\}/\1${{ inputs.version }}/" packages/csharp/lcax/lcax.csproj
35
+
36
+ - name : Pack
37
+ run : dotnet pack
38
+
39
+ - name : Publish Package
40
+ run : |
41
+ cd packages/csharp/lcax
42
+ dotnet nuget push bin/Release/lcax.* --api-key ${{ secrets.nuget_token }} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change @@ -181,4 +181,6 @@ packages/javascript
181
181
182
182
node_modules /
183
183
package.json
184
- package-lock.json
184
+ package-lock.json
185
+ /packages /csharp /lcax /bin /
186
+ /packages /csharp /lcax /obj /
You can’t perform that action at this time.
0 commit comments