Skip to content

Commit b1b59a1

Browse files
committed
fix: replace Set-PSRepository with Register-PSResourceRepository for PSGallery
1 parent b1a68a8 commit b1b59a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/publishpackage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ jobs:
2626
env:
2727
nugetkey: ${{secrets.NUGETKEY}}
2828
run: |
29-
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
29+
Register-PSResourceRepository -Name PSGallery -Uri "https://www.powershellgallery.com/api/v2" -Trusted
3030
$data = Import-PowerShellDataFile .\code365scripts.openai\code365scripts.openai.psd1
3131
if($data.RequiredModules) {
3232
$data.RequiredModules | Foreach-Object {Install-Module -Name $_.ModuleName -RequiredVersion $_.ModuleVersion }
3333
}
3434
Remove-Item -Path ".git" -Recurse -Force
3535
Remove-Item -Path ".github" -Recurse -Force
3636
Remove-Item -Path ".vscode" -Recurse -Force
37-
Publish-PSResource -ApiKey $env:nugetkey -Path code365scripts.openai -Repository PSGallery
37+
Publish-PSResource -ApiKey $env:nugetkey -Path code365scripts.openai -Repository PSGallery
38+

0 commit comments

Comments
 (0)