Skip to content

Commit 07cf2ad

Browse files
committed
.
1 parent 15ad0df commit 07cf2ad

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -278,25 +278,6 @@ jobs:
278278
run: Remove-Item -Path (Join-Path PowerShell DevolutionsGateway) -Recurse -ErrorAction Ignore
279279

280280

281-
- name: Monkey-patch PowerShellGet
282-
shell: pwsh
283-
run: |
284-
# Find the file having wrong .NET version.
285-
$path = Get-ChildItem (Get-Module PowerShellGet -ListAvailable).ModuleBase -Recurse -File |
286-
Select-String -Pattern netcoreapp2.0 | ForEach-Object Path
287-
288-
# Unload PowerShellGet.
289-
Remove-Module PowerShellGet -Verbose -Force -EA 0
290-
291-
# Update the .csproj files.
292-
$path | ForEach-Object {
293-
(Get-Content -LiteralPath $_ -Raw).Replace('netcoreapp2.0', 'net6') |
294-
Set-Content $_
295-
}
296-
297-
# Reload PowerShellGet.
298-
Import-Module PowerShellGet -Force -Verbose
299-
300281
- name: Publish PowerShell module
301282
shell: pwsh
302283
run: |
@@ -315,7 +296,7 @@ jobs:
315296
tar -xvf "$Archive" -C './PowerShell'
316297
Get-ChildItem -Path "./PowerShell" -Recurse
317298
318-
$PublishCmd = @('Publish-Module', '-Force', '-Path', (Join-Path PowerShell DevolutionsGateway), '-NugetApiKey', '${{ secrets.PS_GALLERY_NUGET_API_KEY }}')
299+
$PublishCmd = @('Publish-PSResource', '-Force', '-Repository', 'PSGallery', '-Path', (Join-Path PowerShell DevolutionsGateway), '-ApiKey', '${{ secrets.PS_GALLERY_NUGET_API_KEY }}')
319300
320301
$DryRun = [System.Convert]::ToBoolean('${{ inputs.dry-run }}')
321302
if ($DryRun) {

0 commit comments

Comments
 (0)