WIP attachment export #226
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 .NET SDK | |
on: | |
pull_request: | |
branches: | |
- master | |
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Download C# schemas artifact | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: schemas.cs | |
path: languages/csharp/Bitwarden.Sdk | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
with: | |
global-json-file: languages/csharp/global.json | |
- name: Download x86_64-apple-darwin files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
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@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
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@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: libbitwarden_c_files-x86_64-unknown-linux-gnu | |
path: languages/csharp/Bitwarden.Sdk/ubuntu-x64 | |
- name: Download x86_64-pc-windows-msvc files | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: Bitwarden.Sdk.0.0.1.nupkg | |
path: | | |
./languages/csharp/Bitwarden.Sdk/nuget-output/*.nupkg |