Skip to content

Build and Publish PowerShell Module (Production) #2

Build and Publish PowerShell Module (Production)

Build and Publish PowerShell Module (Production) #2

name: Build and Publish PowerShell Module (Production)
on:
workflow_dispatch:
jobs:
build-and-publish:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Prerequisites
run: .\build\powershell\Install-Prerequisites.ps1
shell: pwsh
- name: Build PowerShell Module (Production)
run: |
.\build\powershell\Build-PSModule.ps1 -BaseDirectory $PWD -ProductionBuild
shell: pwsh
- name: Publish PowerShell Module (Production)
run: |
$secureApiKey = ConvertTo-SecureString -String $env:NUGET_API_KEY -AsPlainText -Force
.\build\powershell\Publish-PSModule.ps1 -NuGetApiKey $secureApiKey
shell: pwsh
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}