publish.ps1

Import-Module DotupPsEssentials
Import-Module DotupPsModuleGenerator

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


[version]$version = (Import-PowerShellDataFile $moduleFile).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;