Skip to content

Releases: PSModule/Install-PSModuleHelpers

v1.0.9

Choose a tag to compare

@github-actions github-actions released this 10 Jul 21:53
8bfb84d

🚀 [Feature]: Import-TestData is available from the shared Helpers module (#20)

The shared Helpers module now provides an Import-TestData command, so every repo that installs the helpers gets it automatically — the same way Install-PSModule is already provided. It reads the PSMODULE_TEST_DATA environment variable (a single-line JSON object with optional secrets and variables maps) and exposes each entry as an environment variable for the remaining steps in the same job, masking secret values in the logs.

New: Import-TestData in the Helpers module

Test data no longer has to be wired up per repo. Previously this logic lived in a caller-shipped ./.github/scripts/Expose-TestData.ps1 that every consumer had to carry, and most never did (Template-PSModule, Confluence, …), so the Test/BeforeAll/AfterAll-ModuleLocal workflows failed with script not found. Shipping the logic in the installed Helpers module means every consumer gets it for free.

Call it from any step after the helpers are installed:

- name: Expose caller-provided test data
  shell: pwsh
  env:
    PSMODULE_TEST_DATA: ${{ secrets.TestData }}
  run: Import-TestData

Behavior:

  • secrets values are masked in the logs via ::add-mask::; variables values are not.
  • Keys are validated: they must be legal environment-variable names, must not override reserved or GitHub-provided variables, must not be duplicated across the two maps, and values must be scalar.
  • When no data is provided it is a no-op.
  • Outside GitHub Actions (no GITHUB_ENV) it fails fast with a clear message instead of a generic parameter-binding error.

Technical Details

  • src/Helpers/Helpers.psm1: adds the Import-TestData function. Its validators (Assert-EnvironmentName, Assert-Map, Get-EnvironmentValue, Add-EnvFromMap) are nested inside it so they stay private — the manifest has no FunctionsToExport, so every top-level function is exported and nesting avoids leaking generic helper names. Named Import-TestData (not Expose-…) because module functions must use an approved verb (PSUseApprovedVerbs is enforced by super-linter across the ecosystem).
  • Values are written to GITHUB_ENV using heredoc syntax, and the writes are terminating (-ErrorAction Stop) even when the caller's ErrorActionPreference is Continue.
  • tests/Import-TestData.Tests.ps1: new standalone test covering masking, GITHUB_ENV heredoc output, the no-op path, missing GITHUB_ENV, an unwritable GITHUB_ENV path, and every validation error (invalid JSON, unexpected top-level key, invalid env name, reserved override, duplicate across maps, non-scalar value).
  • .github/workflows/Action-Test.yml: runs the new test alongside the existing Install-PSModule regression test.
  • Validation: PSScriptAnalyzer clean with the repo settings; the module imports without an unapproved-verb warning; Import-TestData is exported while the validators stay private; the existing regression test still passes.
  • Release chain: release Install-PSModuleHelpers with Import-TestData → pin Process-PSModule to that version → Template-PSModule bumps.

v1.0.8

Choose a tag to compare

@github-actions github-actions released this 08 Jul 12:18
68e8ca7

🪲 [Fix]: Install built modules into their real manifest version folder (#19)

What

Install-PSModule copied the built module into a hard-coded .../<name>/999.0.0 folder and then Import-Moduled it. That only worked while the build pipeline stamped the 999.0.0 placeholder into every manifest. Now that Process-PSModule#326 resolves and stamps the real version at build time, the folder name (999.0.0) no longer matches the manifest ModuleVersion, so PowerShell rejects the module ("does not have a valid module manifest file") and Import-Module fails.

Change

Read the manifest ModuleVersion and install into the matching version folder. Fall back to 999.0.0 only when the manifest is unstamped (a build that opted out of version resolution), preserving the previous behaviour for that case.

Import the freshly installed manifest path with -Force -Global so a preloaded placeholder version does not keep command resolution pinned to 999.0.0.

Validation

Added tests/Install-PSModule.Tests.ps1 and wired it into Action-Test. The regression test covers real-version installation, absence of the 999.0.0 folder for stamped manifests, replacement of a preloaded 999.0.0 command, and rejection of malformed ModuleVersion values.

Local validation passed:

  • pwsh -NoProfile -File ./tests/Install-PSModule.Tests.ps1
  • Invoke-ScriptAnalyzer -Path . -Recurse -Settings .github/linters/.powershell-psscriptanalyzer.psd1
  • action-shaped run: ./src/main.ps1, Get-Module -Name Helpers -ListAvailable, then the regression script

Part of the Process-PSModule#326 "test what you ship" refactor (test-harness version-awareness). Consumed by Test-PSModule, Document-PSModule, and the Process-PSModule Test-Module job.

v1.0.7

Choose a tag to compare

@github-actions github-actions released this 27 Jan 11:19
ed79b6e

🩹[Patch]: Workflow improvements (#9)

This release updates and improves several aspects of the project's GitHub Actions workflows and related configuration files. The main changes include refactoring the release workflow for clarity and security, updating dependencies and action versions to use specific commit SHAs, and cleaning up unused or redundant configuration files.

Workflow and CI/CD Improvements:

  • Renamed .github/workflows/Auto-Release.yml to .github/workflows/Release.yml, updated its trigger to pull_request (instead of pull_request_target), restricted its scope to changes in action.yml and src/**, and changed the main job and step names from Auto-Release to Release. Also replaced the action used for releases to PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a and updated the checkout action to a specific SHA with credentials disabled for improved security.
  • Updated the Action-Test and Linter workflows to use specific commit SHAs for the actions/checkout and super-linter/super-linter actions, and set persist-credentials: false for security. Also, in the Linter workflow, disabled some validators and set additional environment variables.

Dependency and Automation Configuration:

  • Changed the Dependabot update schedule from weekly to daily and added a cooldown period of 7 days between updates.

Configuration Cleanup:

  • Removed the .github/linters/.jscpd.json file, which is no longer needed.
  • Removed the .github/release.yml configuration for automatically generated release notes, as this is now handled by the updated release workflow.

Other Notable Changes:

  • Updated the action.yml to reference the new script location at src/main.ps1 instead of scripts/main.ps1.

v1.0.6

Choose a tag to compare

@github-actions github-actions released this 26 Nov 20:51
d60d63e

Bump actions/checkout from 5 to 6 (#8)

Bumps actions/checkout from 5 to 6.

Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: actions/checkout@v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: actions/checkout@v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[Dependabot compatibility score](https://docs.github.com/en/github/managing-security-vulnerabilities/about-de...

Read more

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 12 Oct 12:29
e05e987

🩹 [Patch]: Encode all PowerShell files using UTF8 with BOM (#7)

Description

This pull request makes a minor update to the scripts/main.ps1 file, adding a Unicode Byte Order Mark (BOM) at the beginning of the file. No functional code changes were made.

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 05 Oct 10:24
eaf819c

🩹 [Patch]: Update Dependabot configuration to include labels for GitHub Actions (#6)

Description

This pull request makes a small configuration update to the Dependabot settings. It adds default labels to pull requests created for GitHub Actions updates, helping with better categorization and filtering.

  • Added dependencies and github-actions labels to Dependabot PRs for GitHub Actions updates in .github/dependabot.yml.

v1.0.3

Choose a tag to compare

@github-actions github-actions released this 19 Aug 11:12
27da0ad

Bump actions/checkout from 4 to 5 (#5)

Bumps actions/checkout from 4 to 5.

Release notes

Sourced from actions/checkout's releases.

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: actions/checkout@v4...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: actions/checkout@v4...v4.3.0

v4.2.2

What's Changed

Full Changelog: actions/checkout@v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: actions/checkout@v4.2.0...v4.2.1

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

V5.0.0

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

  • Update NPM dependencies...
Read more

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 02 Jun 00:04
33fe31e

🩹 [Patch]: Add Set-GitHubLogGroup function for logging in GitHub Actions (#4)

Description

This pull request introduces a new PowerShell function, Set-GitHubLogGroup, in the scripts/Helpers/Helpers.psm1 file. The function provides a DSL approach for grouping log lines in GitHub Actions workflows, improving log organization and readability.

New functionality for GitHub Actions:

  • scripts/Helpers/Helpers.psm1: Added the Set-GitHubLogGroup function, which encapsulates commands within a log group for GitHub Actions. It includes support for creating named log groups using the -Name parameter and executing a provided ScriptBlock. An alias LogGroup is also defined for convenience.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 01 Jun 23:12
938a96c

Add more dependencies from Utilities (#3)

Description

Add function from Utilities:

  • Get-ModuleManifest
  • Set-ModuleManifest
  • Export-PowerShellDataFile
  • Format-ModuleManifest
  • Format-Hashtable
  • Add-PSModulePath

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 17 Apr 19:46
b73de61

What's Changed

🌟 Breaking Changes

New Contributors

Full Changelog: https://github.com/PSModule/Install-PSModuleHelpers/commits/v1.0.0