Skip to content

Release .NET SDK

Release .NET SDK #78

Workflow file for this run

name: Release .NET SDK
run-name: Release .NET SDK
on:
push:
tags:
- "*.*.*" # version, e.g. 1.0.0
jobs:
generate_schemas:
uses: ./.github/workflows/generate-schemas.yml
build_rust:
uses: ./.github/workflows/build-c-bindings.yml
test-rust-crate:
uses: ./.github/workflows/rust-test.yml
secrets:
INFISICAL_UNIVERSAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_SECRET }}
INFISICAL_UNIVERSAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_CLIENT_ID }}
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_PROJECT_ID }}
INFISICAL_SITE_URL: ${{ secrets.INFISICAL_SITE_URL }}
build_dotnet:
name: Build .NET
runs-on: ubuntu-22.04
needs:
- test-rust-crate
- generate_schemas
- build_rust
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Download C# schemas artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: schemas.cs
path: languages/csharp/Infisical.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: libinfisical_c_files-x86_64-apple-darwin
path: languages/csharp/Infisical.Sdk/macos-x64
- name: Download aarch64-apple-darwin files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libinfisical_c_files-aarch64-apple-darwin
path: languages/csharp/Infisical.Sdk/macos-arm64
- name: Download x86_64-unknown-linux-gnu files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libinfisical_c_files-x86_64-unknown-linux-gnu
path: languages/csharp/Infisical.Sdk/linux-x64
- name: Download x86_64-pc-windows-msvc files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libinfisical_c_files-x86_64-pc-windows-msvc
path: languages/csharp/Infisical.Sdk/windows-x64
- name: Build .NET 8 Project
working-directory: languages/csharp/Infisical.Sdk
run: |
dotnet restore
dotnet build --configuration Release
- name: Pack NuGet Package
env:
VERSION: ${{ github.ref_name }}
run: dotnet pack --configuration Release -p:PackageID=Infisical.Sdk -p:Version=${{env.VERSION}} --output ./nuget-output /nologo /v:n
working-directory: languages/csharp/Infisical.Sdk
- name: Publish NuGet Package
run: dotnet nuget push ./languages/csharp/Infisical.Sdk/nuget-output/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json