Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

New-ConfigurationPackageBuild

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.ConfigurationPackageBuildSegment

Creates inline .NET/NuGet package build configuration from the module-build DSL.

Remarks

This cmdlet mirrors the repository package build settings normally authored in project.build.json, allowing Build-Module { } to remain the primary authoring surface for combined module and package publishing.

Examples

Authored help example

EXAMPLE 1


New-ConfigurationPackageBuild -GitHubAccessTokenFilePath 'C:\Path'
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-ConfigurationPackageBuild [-AlignPackageVersions] [-Build] [-BuildBeforeModule] [-CertificateStore <String>] [-CertificateThumbprint <String>] [-CleanStaging] [-Configuration <String>] [-CreateReleaseZip] [-Enabled] [-ExcludeDirectories <String[]>] [-ExcludeProjects <String[]>] [-ExpectedVersion <String>] [-ExpectedVersionMap <IDictionary>] [-ExpectedVersionMapAsInclude] [-ExpectedVersionMapUseWildcards] [-GitHubAccessToken <String>] [-GitHubAccessTokenEnvName <String>] [-GitHubAccessTokenFilePath <String>] [-GitHubGenerateReleaseNotes] [-GitHubIncludeProjectNameInTag] [-GitHubIsPreRelease] [-GitHubPackagesOwner <String>] [-GitHubPrimaryProject <String>] [-GitHubReleaseMode <String>] [-GitHubReleaseName <String>] [-GitHubRepositoryName <String>] [-GitHubTagConflictPolicy <String>] [-GitHubTagName <String>] [-GitHubTagTemplate <String>] [-GitHubUsername <String>] [-IncludePrerelease] [-IncludeProjects <String[]>] [-IncludeSymbols] [-Name <String>] [-NugetCredentialSecret <String>] [-NugetCredentialSecretEnvName <String>] [-NugetCredentialSecretFilePath <String>] [-NugetCredentialUserName <String>] [-NugetSource <String[]>] [-Options <IDictionary>] [-OutputPath <String>] [-OverwriteSignedAssemblies] [-OverwriteSignedPackages] [-PackStrategy <String>] [-PlanOnly] [-PlanOutputPath <String>] [-ProvideLocalNuGetFeed] [-PublishApiKey <String>] [-PublishApiKeyEnvName <String>] [-PublishApiKeyFilePath <String>] [-PublishFailFast] [-PublishGitHub] [-PublishNuget] [-PublishSource <String>] [-ReleaseZipOutputPath <String>] [-RootPath <String>] [-SignAssemblies] [-SignDependencyAssemblies] [-SignPackages] [-SkipDuplicate] [-StagingPath <String>] [-TimeStampServer <String>] [-UpdateVersions] [-UseAsReleaseVersionSource] [-UseGitHubPackages] [-VersionBindings <ProjectVersionBinding[]>] [-VersionTracks <IDictionary>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AlignPackageVersions SwitchParameter optionalposition: namedpipeline: False
Align projects sharing an X-pattern to one next version based on the highest current package version in that group.
Build SwitchParameter optionalposition: namedpipeline: False
Whether package projects should be built/packed.
BuildBeforeModule SwitchParameter optionalposition: namedpipeline: False
Whether package outputs must be produced before the module lane runs.
CertificateStore String optionalposition: namedpipeline: False
Certificate store location for package signing.
CertificateThumbprint String optionalposition: namedpipeline: False
Code signing certificate thumbprint for package signing.
CleanStaging SwitchParameter optionalposition: namedpipeline: False
Whether to clean staging before the package build runs.
Configuration String optionalposition: namedpipeline: False
Build configuration, usually Release or Debug.
CreateReleaseZip SwitchParameter optionalposition: namedpipeline: False
Whether release ZIPs should be created for package projects.
Enabled SwitchParameter optionalposition: namedpipeline: False
Whether this package build lane is enabled. Defaults to true.
ExcludeDirectories String[] optionalposition: namedpipeline: False
Directory names to exclude from project discovery.
ExcludeProjects String[] optionalposition: namedpipeline: False
Project names to exclude.
ExpectedVersion String optionalposition: namedpipeline: False
Global expected package version or X-pattern.
ExpectedVersionMap IDictionary optionalposition: namedpipeline: False
Per-project expected package version map.
ExpectedVersionMapAsInclude SwitchParameter optionalposition: namedpipeline: False
When true, ExpectedVersionMap acts as an include list.
ExpectedVersionMapUseWildcards SwitchParameter optionalposition: namedpipeline: False
When true, ExpectedVersionMap keys support wildcard matching.
GitHubAccessToken String optionalposition: namedpipeline: False
Inline GitHub access token. Prefer file or environment forms for automation.
GitHubAccessTokenEnvName String optionalposition: namedpipeline: False
Environment variable containing the GitHub access token.
GitHubAccessTokenFilePath String optionalposition: namedpipeline: False
Path to a file containing the GitHub access token.
GitHubGenerateReleaseNotes SwitchParameter optionalposition: namedpipeline: False
Whether GitHub should generate release notes.
GitHubIncludeProjectNameInTag SwitchParameter optionalposition: namedpipeline: False
Whether project name should be included in generated package GitHub tags. Defaults to true.
GitHubIsPreRelease SwitchParameter optionalposition: namedpipeline: False
Whether GitHub releases should be marked prerelease.
GitHubPackagesOwner String optionalposition: namedpipeline: False
GitHub user or organization that owns the GitHub Packages NuGet feed.
GitHubPrimaryProject String optionalposition: namedpipeline: False
Primary project used for single-release version resolution.
GitHubReleaseMode String optionalposition: namedpipeline: False
GitHub release mode, for example Single or PerProject.
GitHubReleaseName String optionalposition: namedpipeline: False
GitHub release name template or override.
GitHubRepositoryName String optionalposition: namedpipeline: False
GitHub repository name.
GitHubTagConflictPolicy String optionalposition: namedpipeline: False
GitHub tag conflict policy.
GitHubTagName String optionalposition: namedpipeline: False
GitHub tag name override.
GitHubTagTemplate String optionalposition: namedpipeline: False
GitHub tag template.
GitHubUsername String optionalposition: namedpipeline: False
GitHub owner/user name.
IncludePrerelease SwitchParameter optionalposition: namedpipeline: False
Whether prerelease versions can be considered during version lookup.
IncludeProjects String[] optionalposition: namedpipeline: False
Project names to include.
IncludeSymbols SwitchParameter optionalposition: namedpipeline: False
Whether portable .snupkg symbol packages should be created.
Name String optionalposition: namedpipeline: False
Optional friendly name for this package build lane.
NugetCredentialSecret String optionalposition: namedpipeline: False
NuGet version lookup credential secret.
NugetCredentialSecretEnvName String optionalposition: namedpipeline: False
Environment variable containing the NuGet version lookup credential secret.
NugetCredentialSecretFilePath String optionalposition: namedpipeline: False
Path to a file containing the NuGet version lookup credential secret.
NugetCredentialUserName String optionalposition: namedpipeline: False
NuGet version lookup credential user name.
NugetSource String[] optionalposition: namedpipeline: False
NuGet sources used for version lookup.
Options IDictionary optionalposition: namedpipeline: False
Additional project-build options for fields not yet modeled as first-class parameters.
OutputPath String optionalposition: namedpipeline: False
Package output path override.
OverwriteSignedAssemblies SwitchParameter optionalposition: namedpipeline: False
Whether existing Authenticode assembly signatures may be replaced.
OverwriteSignedPackages SwitchParameter optionalposition: namedpipeline: False
Whether existing NuGet package signatures may be replaced.
PackStrategy String optionalposition: namedpipeline: False
Pack strategy, for example PerProject or MSBuild.
PlanOnly SwitchParameter optionalposition: namedpipeline: False
Whether to produce a plan without executing package build steps.
PlanOutputPath String optionalposition: namedpipeline: False
Plan output path.
ProvideLocalNuGetFeed SwitchParameter optionalposition: namedpipeline: False
Whether package outputs should be exposed as a temporary local NuGet feed for the module lane.
PublishApiKey String optionalposition: namedpipeline: False
Inline NuGet publish API key. Prefer file or environment forms for automation.
PublishApiKeyEnvName String optionalposition: namedpipeline: False
Environment variable containing the NuGet publish API key.
PublishApiKeyFilePath String optionalposition: namedpipeline: False
Path to a file containing the NuGet publish API key.
PublishFailFast SwitchParameter optionalposition: namedpipeline: False
Whether package publishing should stop on first failure.
PublishGitHub SwitchParameter optionalposition: namedpipeline: False
Whether package GitHub release publishing should be enabled.
PublishNuget SwitchParameter optionalposition: namedpipeline: False
Whether NuGet packages should be published.
PublishSource String optionalposition: namedpipeline: False
NuGet publish source.
ReleaseZipOutputPath String optionalposition: namedpipeline: False
Release ZIP output path override.
RootPath String optionalposition: namedpipeline: False
Root path used for project discovery.
SignAssemblies SwitchParameter optionalposition: namedpipeline: False
Whether assemblies should be signed before packages are created.
SignDependencyAssemblies SwitchParameter optionalposition: namedpipeline: False
Whether copied dependency assemblies should also be signed.
SignPackages SwitchParameter optionalposition: namedpipeline: False
Whether generated NuGet packages should be signed.
SkipDuplicate SwitchParameter optionalposition: namedpipeline: False
Whether duplicate NuGet packages should be skipped during push.
StagingPath String optionalposition: namedpipeline: False
Staging root for project-build outputs.
TimeStampServer String optionalposition: namedpipeline: False
Timestamp server URL for package signing.
UpdateVersions SwitchParameter optionalposition: namedpipeline: False
Whether project/package versions should be updated.
UseAsReleaseVersionSource SwitchParameter optionalposition: namedpipeline: False
Whether the resolved package version should be used as the unified release version source.
UseGitHubPackages SwitchParameter optionalposition: namedpipeline: False
Whether GitHub Packages should be used as the NuGet version lookup and publish feed.
VersionBindings ProjectVersionBinding[] optionalposition: namedpipeline: False
Repository files whose embedded versions follow a resolved project version.
VersionTracks IDictionary optionalposition: namedpipeline: False
Shared version tracks keyed by track name.

Outputs

PowerForge.ConfigurationPackageBuildSegment