publish.ps1


New-ModuleManifest -Path .\MeasureRows.psd1 -RootModule MeasureRows.psm1 -Description "Apteco PS Modules - PowerShell file rows count" -PowerShellVersion 5.1 -Author "florian.von.bracht@apteco.de"


# Parameters for publishing the module
$Path = 'C:\Users\Florian\Documents\GitHub\AptecoPSModules\ExtendFunction\ExtendFunction'
$PublishParams = @{
   NuGetApiKey = 'oy2by6nuddewpjybo2wq7ei3k3xnwzluzn7xfms3yuzftm' # Swap this out with your API key
   Path = $Path
   #ProjectUri = 'https://github.com/RamblingCookieMonster/PSStackExchange'
   #Tags = @('StackExchange', 'StackOverflow', 'REST', 'API' )
}

# We install and run PSScriptAnalyzer against the module to make sure it's not failing any tests
Install-Module -Name PSScriptAnalyzer -force
Import-Module PSScriptAnalyzer
Invoke-ScriptAnalyzer -Path $Path

# Test the publish
Publish-Module @PublishParams -WhatIf -Verbose -Repository PSGallery

# Do the publish
Publish-Module @PublishParams -Verbose -Repository PSGallery

# The module is now listed on the PowerShell Gallery
Find-Module MeasureRows