File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -105,17 +105,22 @@ 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
+ displayName: Install and import Microsoft.PowerShell.PSResourceGet
112
+
108
113
# Register local folder as PSRepository
109
- # Then publish- module to that folder
114
+ # Then publish module to that folder
110
115
- pwsh : |
111
116
$localRepo = "$(Build.SourcesDirectory)/local"
112
117
New-Item -Path $localRepo -ItemType Directory -Force
113
118
$vstsCommandString = "vso[task.setvariable variable=localRepo]${localRepo}"
114
119
Write-Host "local repo is: " + $vstsCommandString
115
120
Write-Host "##$vstsCommandString"
116
121
117
- Register-PSRepository -Name local -SourceLocation $localRepo
118
- Publish-Module -Path $(signOutPath) -Repository local
122
+ Register-PSResourceRepository -Name local -URI $localRepo
123
+ Publish-PSResource -Path $(signOutPath) -Repository local
119
124
displayName: Publish module to local repository
120
125
121
126
# 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