Skip to content

Move version generation from Publish to Build step #176

Closed as duplicate

Description

Context

In the current Process-PSModule workflow, version numbers are generated during the Publish step. This means the artifact that is tested may not be identical to the artifact that is published, since the version is stamped after testing.

Request

Version generation should be moved from the Publish step to the Build step. This ensures the artifact is fully versioned before testing, so what gets tested is exactly what gets published. Additionally, having a versioned prerelease artifact available after build enables sharing it with other workflows (e.g., PSModule/GitHub-Script action tests).

What is expected

  • The Build step produces a fully versioned module artifact (including prerelease tags if applicable)
  • The Test step tests the exact versioned artifact
  • The Publish step publishes the same unaltered artifact
  • Prerelease artifacts are available for downstream consumption after the build step

Acceptance criteria

  • Version number is determined and applied during the Build step
  • The tested artifact is byte-identical to the published artifact
  • Prerelease artifacts can be consumed by other workflows

Technical decisions

To be determined during implementation planning — evaluate how version information is currently generated and where it gets stamped into the manifest.


Implementation plan

  • Identify where version generation currently occurs in the Publish step
  • Move version calculation logic to the Build step
  • Apply the version to the module manifest during build
  • Ensure the Test step uses the versioned artifact
  • Ensure the Publish step publishes without modifying the artifact
  • Make the prerelease artifact available for downstream workflows
  • Test the full build → test → publish pipeline with the new ordering

Activity

  1. changed the title [-]🩹 [Patch]: Move versioning from Publish to Build[/-] [+]Move version generation from Publish to Build step[/+] on Apr 5, 2026
  2. MariusStorhaug commented on Apr 5, 2026

    @MariusStorhaug
    MemberAuthor

    Restructured issue description into the standard three-section format.

    • Rewrote from brief notes into a proper context/request structure
    • Updated title to imperative mood (removed emoji prefix)
    • Added acceptance criteria
    • Created implementation plan with 7 tasks
    • Applied Minor label (architectural improvement)
  3. MariusStorhaug commented on May 3, 2026

    @MariusStorhaug
    MemberAuthor

    Cross-reference: The version generation logic duplication between Publish-PSModule and Release-GHRepository has been analyzed in detail in #326 (Extract shared versioning and release logic). Moving version generation to the Build step depends on first extracting the shared versioning module described there. See also #330 for the full SRP refactoring of Publish-PSModule.

  4. MariusStorhaug commented on May 16, 2026

    @MariusStorhaug
    MemberAuthor

    This can be closed as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions