diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cd2742f..3776e99 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -103,3 +103,16 @@ jobs: testRunTitle: "PSCore_MacOS1013_Built" displayName: "Publish Test Results" condition: always() + + # Publish Module to Gallery + - job: Publish + dependsOn: Build + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/zvma-updates')) + pool: + vmImage: 'windows-latest' + steps: + - powershell: | + Install-Module -Name PowerShellGet -Force -Scope CurrentUser + $apiKey = "$(PowerShellGalleryApiKey)" + Publish-Module -Name 'ZertoApiWrapper' -NuGetApiKey $apiKey + displayName: 'Publish to PowerShell Gallery'