Skip to content

Publish to PowerShell Gallery #28

Publish to PowerShell Gallery

Publish to PowerShell Gallery #28

name: Publish to PowerShell Gallery
on:
workflow_dispatch:
jobs:
publish-powershell:
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: |
FeE4uHTMEVJJhAdWK0ubMg/field/password > NUGET_AUTH_TOKEN
- name: Publish package
shell: pwsh
run: |
Set-Location ./SecretManagement.Keeper/
./build.ps1 -Package -Publish -APIKey ${{steps.ksmsecrets.outputs.NUGET_AUTH_TOKEN}}