How-to Guides
Know whether you need pack, upload, publish, or release
NovaModuleTools gives you four different delivery commands because they solve four different problems. This page shows you what each command does, what it does not do, and how to configure the related workflow safely.
Choose the right command
| Command | What it does | What it does not do | Use it when… |
|---|---|---|---|
New-NovaModulePackage / % nova package |
Builds, tests, and creates package artifacts such as .nupkg and
.zip.
|
Does not upload or publish the package anywhere. | You need artifacts in artifacts/packages/. |
Deploy-NovaPackage / % nova deploy |
Uploads existing artifacts to a raw HTTP endpoint. | Does not build, test, or create the package first. | You already have artifacts and need to push them to Nexus, Artifactory, or another raw endpoint. |
Publish-NovaModule / % nova publish |
Builds, tests, and publishes the module locally or to a PowerShell repository. | Does not create generic raw HTTP uploads. | You want the PowerShell module itself published, not just an arbitrary artifact. |
Invoke-NovaRelease / % nova release |
Builds, tests, bumps the version, rebuilds, and then publishes. | Does not replace New-NovaModulePackage or raw upload as a generic artifact
workflow.
|
You want one orchestrated release command instead of separate steps. |
New-NovaModulePackage creates files. Deploy-NovaPackage sends those
files to
a raw endpoint. Publish-NovaModule publishes the module itself to a PowerShell
repository. Invoke-NovaRelease coordinates versioning plus publishing.
Create package artifacts
Use New-NovaModulePackage or % nova package when you want a package
artifact
generated
from the built module output.
What happens
- Nova builds the project.
- Nova runs the test workflow.
- Nova creates one or more package artifacts under
Package.OutputDirectory.Path, which defaults toartifacts/packages/.
Use -SkipTests, --skip-tests, or -s when tests already
ran earlier in your pipeline. Nova still rebuilds before packaging; it only skips
Invoke-NovaTest and Test-NovaBuild.
Common examples
PS> New-NovaModulePackage
PS> New-NovaModulePackage -SkipTests
% nova package
% nova package --skip-tests
% nova package -s
This creates a .nupkg by default when Package.Types is omitted.
{
"Package": {
"Types": ["Zip"]
}
}
This creates only a .zip.
{
"Package": {
"Types": ["NuGet", "Zip"],
"Latest": "stable",
"OutputDirectory": {
"Path": "artifacts/packages",
"Clean": true
}
}
}
This creates both formats and, for stable versions, also adds latest aliases, such as:
MyModule.2.0.0.nupkg
MyModule.latest.nupkg
MyModule.2.0.0.zip
MyModule.latest.zip
What metadata is reused
- top-level
ProjectName,Description, andVersion Manifest.AuthorManifest.TagsManifest.ProjectUriManifest.ReleaseNotesManifest.LicenseUri
Upload package artifacts to a raw endpoint
Use Deploy-NovaPackage or % nova deploy when you already have package files
and you need to push them to a raw HTTP endpoint.
If you have not run New-NovaModulePackage yet, upload has nothing to send unless you
explicitly point it at existing package files with -PackagePath.
Common ways to target artifacts
PS> Deploy-NovaPackage -Repository LocalNexus
% nova deploy --repository LocalNexus
Use a named repository from Package.Repositories.
PS> Deploy-NovaPackage -Url 'https://packages.example/raw/' -Token $env:NOVA_PACKAGE_TOKEN
% nova deploy --url https://packages.example/raw/ --token $env:NOVA_PACKAGE_TOKEN
Use a direct URL when CI or a one-off script already knows the endpoint.
PS> Deploy-NovaPackage -PackageType Zip -Repository LocalNexus
% nova deploy --type Zip --repository LocalNexus
Filter to only one package type.
PS> Deploy-NovaPackage -PackagePath @(
'artifacts/packages/MyModule.2.0.0.zip',
'artifacts/packages/MyModule.latest.zip'
) -Url 'https://packages.example/raw/releases/'
% nova deploy --path artifacts/packages/MyModule.2.0.0.zip \
--path artifacts/packages/MyModule.latest.zip \
--url https://packages.example/raw/releases/
Use explicit file paths when you do not want Nova to discover package files from the configured output directory.
How upload target resolution works
- If you pass
-Url, Nova uses it. - Otherwise, if you pass
-Repository, Nova resolves the matching entry fromPackage.Repositories. - Otherwise, Nova falls back to package-level defaults such as
Package.RepositoryUrl.
If no target can be resolved, upload fails fast with a clear error telling you to provide
-Url or configure package-level upload settings.
Headers and auth
Upload uses a generic auth model so you can target many raw repository types without turning the command into a vendor-specific integration.
| Scenario | Recommended configuration |
|---|---|
| Bearer token | HeaderName = "Authorization", Scheme = "Bearer", TokenEnvironmentVariable
= "NOVA_PACKAGE_TOKEN" |
| Custom API key header | HeaderName = "X-Api-Key", TokenEnvironmentVariable =
"NOVA_PACKAGE_API_KEY" |
| HTTP Basic auth | HeaderName = "Authorization", Scheme = "Basic", and an
environment variable whose value is the Base64-encoded username:password
|
When multiple matching files exist, Nova uploads all matching artifacts for the selected type or
configured types. That includes versioned and latest artifacts.
Publish to a PowerShell repository
Use Publish-NovaModule or % nova publish when you want to publish the built
module itself either locally or to a PowerShell repository.
Local publish
PS> Publish-NovaModule -Local
% nova publish --local
% nova publish -l
Local publish is useful when you want to validate a realistic install/import cycle without pushing to a shared repository. After a successful local publish, Nova reloads the published module from the local install path into the current PowerShell session.
Repository publish
PS> Publish-NovaModule -Repository PSGallery -ApiKey $env:PSGALLERY_API
PS> Publish-NovaModule -Repository PSGallery -ApiKey $env:PSGALLERY_API -SkipTests
PS> Publish-NovaModule -Repository PSGallery -ApiKey $env:PSGALLERY_API -ContinuousIntegration
% nova publish --repository PSGallery --api-key $env:PSGALLERY_API
% nova publish --repository PSGallery --api-key $env:PSGALLERY_API --skip-tests
% nova publish --repository PSGallery --api-key $env:PSGALLERY_API --continuous-integration
Repository mode is for registered PowerShell repositories such as PowerShell Gallery.
Custom local path
PS> Publish-NovaModule -Local -ModuleDirectoryPath ~/Modules
% nova publish --local --path ~/Modules
Command-line note: the launcher uses --path / -p for
the custom module directory target in this flow.
Use this when you want local publishing to target a custom module directory.
Use -SkipTests, --skip-tests, or -s when tests already ran
earlier in the pipeline. Publish still rebuilds before copying or repository publishing.
Use -ContinuousIntegration, --continuous-integration, or
-i
when later commands in the same session must switch back to the built dist/ module
after publish completes.
What -WhatIf means here
When you preview local publish, Nova does not build, test, copy, or import the module. The preview is safe and side-effect free.
Run the release workflow
Use Invoke-NovaRelease or % nova release when you want one command to
coordinate build, test, version bump, rebuild, and publish.
What happens
- Build the module.
- Run the tests.
- Calculate and write the next semantic version.
- Build again so the output reflects the new version.
- Publish locally or to a repository.
Use -SkipTests, --skip-tests, or -s when tests already ran
earlier in your pipeline. Release still runs both build steps; it only skips the pre-release
Invoke-NovaTest and Test-NovaBuild steps.
Examples
PS> Invoke-NovaRelease -Local
PS> Invoke-NovaRelease -Repository PSGallery -ApiKey $env:PSGALLERY_API
PS> Invoke-NovaRelease -Repository PSGallery -ApiKey $env:PSGALLERY_API -SkipTests
PS> Invoke-NovaRelease -Repository PSGallery -ApiKey $env:PSGALLERY_API -ContinuousIntegration
% nova release --repository PSGallery --api-key $env:PSGALLERY_API
% nova release --repository PSGallery --api-key $env:PSGALLERY_API --skip-tests
% nova release --repository PSGallery --api-key $env:PSGALLERY_API --continuous-integration
Command-line note: the launcher flow covers the repository-oriented release
path.
The PowerShell view is still the place for advanced hashtable-style publish options such as
@{ Local = $true }.
Important difference from local publish
Local release does not import the published module into your current session
afterward. That behavior is specific to Publish-NovaModule -Local.
When you use the continuous-integration form, Nova still restores the built dist/ module
after the CI-sensitive release boundaries so later commands in the same session keep using the built
module state.
When to prefer release over separate steps
- Use release when your version bump and publish should happen together.
- Use separate commands when you want to inspect artifacts, review versioning, or pause between steps.