Publish.Extensions.ps1

$apiKeyPath = "$PSScriptRoot\~apikey";
$apiKeyValue = "$(Get-Content $apiKeyPath)";

Get-ChildItem -Path $(Get-Location) -Directory | ForEach-Object {
    Write-Host;
    Write-Host $_.Name;
    Write-Host "-------------------------------------";

    $PublishParams = @{
        NuGetApiKey = $apiKeyValue
        Path        = $_.FullName
    };
    Publish-Module @PublishParams;
};