Skip to content

Commit 657b095

Browse files
authored
Merge pull request #55 from alerickson/updateYaml
Update yaml to use PSResourceGet
2 parents 9bb52af + d421244 commit 657b095

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.ci/releaseBuild.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,22 @@ stages:
105105
PackageName: 'PowerShellGet'
106106
PackageVersion: '$(moduleVersion)'
107107

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+
108113
# Register local folder as PSRepository
109-
# Then publish-module to that folder
114+
# Then publish module to that folder
110115
- pwsh: |
111116
$localRepo = "$(Build.SourcesDirectory)/local"
112117
New-Item -Path $localRepo -ItemType Directory -Force
113118
$vstsCommandString = "vso[task.setvariable variable=localRepo]${localRepo}"
114119
Write-Host "local repo is: " + $vstsCommandString
115120
Write-Host "##$vstsCommandString"
116121
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
119124
displayName: Publish module to local repository
120125
121126
# finally publish the parts of the build which will be used in the next stages

0 commit comments

Comments
 (0)