publish.ps1

Import-Module DotupPsEssentials
Import-Module DotupPsModuleGenerator

$path = Get-Location;
$moduleName = Split-Path $path -Leaf
$moduleFile = "$((Join-Path $path $moduleName)).psd1"

$manifest = Import-PowerShellDataFile .\BeardAnalysis.psd1 
[version]$version = $Manifest.ModuleVersion
# Add one to the build of the version number
[version]$NewVersion = "{0}.{1}.{2}" -f $Version.Major, $Version.Minor, ($Version.Build + 1) 
# Update the manifest file
Update-ModuleManifest -Path $moduleFile -ModuleVersion $NewVersion

#$functions = Get-PsModuleFunctions $path -PublicOnly
#Update-ModuleManifest -Path $moduleFile -FunctionsToExport $functions;

$PowershellApiKey = "oy2brhym6syjwgjiwnoqhnh56zx52pju7b27ravqwewwwy";

Publish-Module -Path $path -NugetAPIKey $PowershellApiKey;