Update azure-pipelines.yml
This commit is contained in:
+15
-1
@@ -57,6 +57,12 @@ jobs:
|
|||||||
testRunTitle: "PSCore_Win2016_Built"
|
testRunTitle: "PSCore_Win2016_Built"
|
||||||
displayName: "Publish Test Results"
|
displayName: "Publish Test Results"
|
||||||
condition: always()
|
condition: always()
|
||||||
|
# Publish module as an artifact
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: "publish/ZertoApiWrapper"
|
||||||
|
ArtifactName: "ZertoApiWrapper"
|
||||||
|
publishLocation: "Container"
|
||||||
|
|
||||||
# Linux Build Job
|
# Linux Build Job
|
||||||
- job: Build_PSCore_Ubuntu
|
- job: Build_PSCore_Ubuntu
|
||||||
@@ -115,8 +121,16 @@ jobs:
|
|||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
|
# Download the artifact
|
||||||
|
- task: DownloadBuildArtifacts@0
|
||||||
|
inputs:
|
||||||
|
artifactName: 'ZertoApiWrapper' # The name of the artifact you specified in the build job
|
||||||
|
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
# Publish the module to the PowerShell Gallery
|
||||||
- powershell: |
|
- powershell: |
|
||||||
Install-Module -Name PowerShellGet -Force -Scope CurrentUser
|
Install-Module -Name PowerShellGet -Force -Scope CurrentUser
|
||||||
|
$env:PSModulePath = "$(Build.ArtifactStagingDirectory);"+$env:PSModulePath
|
||||||
$apiKey = "$(PowerShellGalleryApiKey)"
|
$apiKey = "$(PowerShellGalleryApiKey)"
|
||||||
Publish-Module -Name 'ZertoApiWrapper' -NuGetApiKey $apiKey
|
Publish-Module -Name 'ZertoApiWrapper' -Path "$(Build.ArtifactStagingDirectory)/ZertoApiWrapper" -NuGetApiKey $apiKey
|
||||||
displayName: 'Publish to PowerShell Gallery'
|
displayName: 'Publish to PowerShell Gallery'
|
||||||
|
|||||||
Reference in New Issue
Block a user