Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

v5.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 May 17:19
672aaa7

🌟 [Major]: Module manifests now stamped with the resolved version at build time (#136)

Module manifests are now stamped with the resolved version and prerelease tag at build time. The resulting artifact contains its final ModuleVersion (and PrivateData.PSData.Prerelease) before tests run, so the bytes that are tested are the bytes that ship.

Inputs on Build-PSModule

Build-PSModule now exposes new module-centric inputs:

Input Required Description
Name No Name of the module to build. Defaults to the repository name.
Version Yes Module version (Major.Minor.Patch) to stamp into the manifest. Build fails with a clear error when omitted or malformed.
Prerelease No Prerelease tag (for example mybranch001) to stamp into PrivateData.PSData.Prerelease. When empty, no prerelease tag is written.
OutputFolder No Path (relative to WorkingDirectory) where the built module is placed. Defaults to outputs/module.

Typical usage downstream of PSModule/Resolve-PSModuleVersion:

- name: Build module
  uses: PSModule/Build-PSModule@v5
  with:
    Version: ${{ steps.resolve.outputs.Version }}
    Prerelease: ${{ steps.resolve.outputs.Prerelease }}

Breaking changes

  • Version is now required. Callers that previously omitted it (relying on the 999.0.0 placeholder) must now pass an explicit version in Major.Minor.Patch format. Builds fail immediately with a clear error when Version is missing or malformed.

Technical details

  • action.yml: adds OutputFolder (default outputs/module), Version (required: true), and Prerelease inputs; Name remains optional and still defaults to the repository name.
  • src/main.ps1: reads OutputFolder, Version, and Prerelease from env; throws immediately when Version is missing or not in Major.Minor.Patch format.
  • src/helpers/Build-PSModule.ps1: ModuleVersion parameter is now [Parameter(Mandatory)].
  • src/helpers/Build/Build-PSModuleManifest.ps1: ModuleVersion is [Parameter(Mandatory)]; the 999.0.0 fallback is removed — the version is assigned directly.

Related PRs:

Morty Proxy This is a proxified and sanitized view of the page, visit original site.