tldag-dotnet

Publish-Module

September 2021, Roger H. Jörg

Find the source

The call…

Get-Command Publish-Module

… returns …

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Publish-Module                                     2.2.5      PowerShellGet

… revealing that Publish-Module is actually a function and part of the PowerShellGet module.

I soon found the source of PowerShell on GitHub, but it doesn’t contain Publish-Module.

Further investigation of the PowerShell Repositories showed the repository for PowerShellGet. But that source is for version 3 and doesn’t contain Publish-Module either.

Reading its readme I eventually found the source.

What a disappointement: that’s a script!

Inner Workings

Publish-Module.ps1

Publish-PSArtifactUtility.ps1

Publish-NugetPackage.ps1

Conclusions

References