From 497f2f0337442412ba750667a1a0787808e938d7 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 6 May 2026 16:50:50 -0700 Subject: [PATCH] Remove the 'Publish-NugetToMyGet' command from packaging module --- tools/packaging/packaging.psd1 | 1 - tools/packaging/packaging.psm1 | 36 ---------------------------------- 2 files changed, 37 deletions(-) diff --git a/tools/packaging/packaging.psd1 b/tools/packaging/packaging.psd1 index b72c14b80f1..b71b7e79d13 100644 --- a/tools/packaging/packaging.psd1 +++ b/tools/packaging/packaging.psd1 @@ -18,7 +18,6 @@ 'New-ILNugetPackageFromSource' 'New-PSBuildZip' 'New-PSSignedBuildZip' - 'Publish-NugetToMyGet' 'Start-PSPackage' 'Test-PackageManifest' 'Update-PSSignedBuildFolder' diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index a551a483c8d..082f917f63c 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -3559,42 +3559,6 @@ function New-NugetPackage Pop-Location } -<# -.SYNOPSIS -Publish the specified Nuget Package to MyGet feed. - -.DESCRIPTION -The specified nuget package is published to the powershell.myget.org/powershell-core feed. - -.PARAMETER PackagePath -Path to the NuGet Package. - -.PARAMETER ApiKey -API key for powershell.myget.org -#> -function Publish-NugetToMyGet -{ - param( - [Parameter(Mandatory = $true)] - [string] $PackagePath, - - [Parameter(Mandatory = $true)] - [string] $ApiKey - ) - - $nuget = Get-Command -Type Application nuget -ErrorAction SilentlyContinue - - if ($null -eq $nuget) - { - throw 'nuget application is not available in PATH' - } - - Get-ChildItem $PackagePath | ForEach-Object { - Write-Log "Pushing $_ to PowerShell Myget" - Start-NativeExecution { nuget push $_.FullName -Source 'https://powershell.myget.org/F/powershell-core/api/v2/package' -ApiKey $ApiKey } > $null - } -} - function New-SubFolder { [CmdletBinding(SupportsShouldProcess=$true)]