Skip to content

8. Update GitHub Actions Workflows #1566

@SamErde

Description

@SamErde

8. Update GitHub Actions Workflows

Status: Confirmed.

Location: ./.github/workflows/

Problem: The existing build and publish workflows either inline build logic or reference
steps that are no longer valid after the introduction of the consolidated build script and the
./module/ output directory.

Actions:

Build/CI workflow (e.g., build.yml or equivalent):

  • Replace any inline consolidation or copy steps with a single call to
    ./build/Build-MaesterModule.ps1.
  • Add a step that validates the output ./module/ directory contains the expected files
    before proceeding.
  • Add a step that imports ./module/Maester.psd1 and runs Get-Help against a
    representative sample of functions to verify comment-based help is intact after
    consolidation.
  • Add a step that runs a smoke test by importing the module and calling
    Get-Command -Module Maester to confirm the expected function count is exported.

Publish workflow (e.g., publish.yml or equivalent):

  • Publish from ./module/ rather than from ./powershell/ or any other source directory.
  • Ensure the publish step runs only after the build step has completed and all validation
    steps have passed.
  • Confirm that the ModuleVersion in ./module/Maester.psd1 has been correctly stamped by
    the build process before publishing.
  • Zip the ./module/ directory and attach it as an artifact on the GitHub Release, so users
    can download the built module directly from the Releases page without installing from
    the PowerShell Gallery.

General workflow hygiene:

  • Both workflows should check out the repository and invoke ./build/Build-MaesterModule.ps1
    as the first substantive step, rather than duplicating logic between workflows.
  • Add workflow-level comments explaining that ./module/ is a build artifact and should
    never be committed to source control.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions