Skip to content

Publish to NuGet

Publish to NuGet #30

Workflow file for this run

name: Publish to NuGet
on:
workflow_dispatch:
jobs:
publish-nuget:
environment: prod
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk/dotNet
steps:
- name: Get the source code
uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Retrieve secrets from KSM
id: ksmsecrets
uses: Keeper-Security/ksm-action@master
with:
keeper-secret-config: ${{ secrets.KSM_KSM_CONFIG }}
secrets: |
Sq4nnb5HXXNp1l6KryXynw/field/password > NUGET_AUTH_TOKEN
- name: Publish package
run: dotnet nuget push ./SecretsManager/bin/Release/*.nupkg --api-key ${{steps.ksmsecrets.outputs.NUGET_AUTH_TOKEN}} --source https://api.nuget.org/v3/index.json