Publish to PowerShell Gallery #26
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: 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}} |