-
Notifications
You must be signed in to change notification settings - Fork 50
78 lines (64 loc) · 2.61 KB
/
build-dotnet.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build .NET SDK
on:
push:
branches:
- main
jobs:
generate_schemas:
uses: ./.github/workflows/generate_schemas.yml
build_rust:
uses: ./.github/workflows/build-rust-cross-platform.yml
build_dotnet:
name: Build .NET
runs-on: ubuntu-22.04
needs:
- generate_schemas
- build_rust
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Download C# schemas artifact
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: schemas.cs
path: languages/csharp/Bitwarden.Sdk
- name: Set up .NET Core
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
global-json-file: languages/csharp/global.json
- name: Download x86_64-apple-darwin files
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: libbitwarden_c_files-x86_64-apple-darwin
path: languages/csharp/Bitwarden.Sdk/macos-x64
- name: Download aarch64-apple-darwin files
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: libbitwarden_c_files-aarch64-apple-darwin
path: languages/csharp/Bitwarden.Sdk/macos-arm64
- name: Download x86_64-unknown-linux-gnu files
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: libbitwarden_c_files-x86_64-unknown-linux-gnu
path: languages/csharp/Bitwarden.Sdk/linux-x64
- name: Download x86_64-pc-windows-msvc files
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: libbitwarden_c_files-x86_64-pc-windows-msvc
path: languages/csharp/Bitwarden.Sdk/windows-x64
- name: Build .NET 6 Project
working-directory: languages/csharp/Bitwarden.Sdk
run: |
dotnet restore
dotnet build --configuration Release
- name: Pack NuGet Package
env:
VERSION: 0.0.1
run: dotnet pack --configuration Release -p:PackageID=Bitwarden.Sdk -p:Version=${VERSION} --output ./nuget-output /nologo /v:n
working-directory: languages/csharp/Bitwarden.Sdk
- name: Upload NuGet package
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: Bitwarden.Sdk.0.0.1.nupkg
path: |
./languages/csharp/Bitwarden.Sdk/nuget-output/*.nupkg