File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -105,17 +105,23 @@ stages:
105
105
PackageName : ' PowerShellGet'
106
106
PackageVersion : ' $(moduleVersion)'
107
107
108
+ - pwsh : |
109
+ Set-PSRepository PSGallery -InstallationPolicy Trusted
110
+ Install-Module "Microsoft.PowerShell.PSResourceGet" -Repository PSGallery
111
+ Import-Module "Microsoft.PowerShell.PSResourceGet"
112
+ displayName: Install and import Microsoft.PowerShell.PSResourceGet
113
+
108
114
# Register local folder as PSRepository
109
- # Then publish- module to that folder
115
+ # Then publish module to that folder
110
116
- pwsh : |
111
117
$localRepo = "$(Build.SourcesDirectory)/local"
112
118
New-Item -Path $localRepo -ItemType Directory -Force
113
119
$vstsCommandString = "vso[task.setvariable variable=localRepo]${localRepo}"
114
120
Write-Host "local repo is: " + $vstsCommandString
115
121
Write-Host "##$vstsCommandString"
116
122
117
- Register-PSRepository -Name local -SourceLocation $localRepo
118
- Publish-Module -Path $(signOutPath) -Repository local
123
+ Register-PSResourceRepository -Name local -URI $localRepo
124
+ Publish-PSResource -Path $(signOutPath) -Repository local
119
125
displayName: Publish module to local repository
120
126
121
127
# finally publish the parts of the build which will be used in the next stages
You can’t perform that action at this time.
0 commit comments