From 5f6693fac43a2481df0e01ce063b670540600bbd Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 23 Jan 2024 18:31:15 -0500 Subject: [PATCH] Update azure-pipelines.yml --- azure-pipelines.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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'