Releases: PSModule/Get-PSModuleSettings
v1.0.3
Handle PascalCase PR event payload keys (#4)
- Handle
Action/PullRequestcasing in event payloads when determining PR action and merged status.
Fixes
Testing
- Not run (logic-only change).
v1.0.2
🩹 [Patch]: Correct how we get pull request info (#3)
This release updates the logic for processing GitHub event data in scripts/main.ps1, making the workflow more robust and accurate when handling pull request events. The main improvements focus on how event data is retrieved and how pull request states are determined.
Event Data Handling Improvements:
- Added logic to retrieve and parse GitHub event data more reliably, including a fallback to read and parse the event file if the primary method fails.
- Introduced a dedicated logging group to output the full event data for easier debugging.
Pull Request State Calculation Enhancements:
- Refactored how pull request action and merged status are determined, using parsed event data instead of relying solely on environment variables.
- Updated the conditions for identifying open/updated, abandoned, and merged pull requests to use the improved event data logic, ensuring more accurate state detection.
v1.0.1
🩹[Patch]: Fix repo linting on merge to main (#2)
This release updates the logic for determining pull request states in the scripts/main.ps1 script, making the conditions for open, updated, abandoned, and merged pull requests more precise and adding improved logging for GitHub event inputs.
Improvements to PR state detection:
- Refined the
$isOpenOrUpdatedPRcondition to trigger only for'opened','reopened', or'synchronize'actions, making it more accurate than the previous logic. - Updated the
$isMergedPRcondition to require both the'closed'action and that the PR is marked as merged, preventing false positives.
Logging enhancements:
- Added output of relevant GitHub event environment variables at the start of the job run conditions calculation for easier debugging and traceability.
v1.0.0
🌟[Major] Introducing Get-PSModuleSettings GitHub Action (#1)
This release introduces a new GitHub Action, Get-PSModuleSettings, which replaces the previous template action in PSModule/Process-PSModule. The action is designed to load and process PowerShell module workflow settings from configuration files, compute job run conditions, and output structured settings and test suite information for use in CI pipelines.
How It Works
The Get-PSModuleSettings action:
- Loads settings from a specified configuration file (supporting JSON, YAML, or PSD1 formats)
- Validates settings against a comprehensive JSON schema to ensure correctness
- Applies defaults for any missing configuration values
- Generates test suite matrices for multiple operating systems (Linux, macOS, Windows) based on test discovery
- Computes job run conditions based on PR state (open, updated, merged, abandoned)
- Outputs structured JSON containing all settings, test suites, and run conditions for downstream workflow steps
Configuration Format Support
The action supports three configuration formats:
- JSON - Standard JSON configuration files
- YAML/YML - Human-readable YAML format
- PSD1 - PowerShell Data File format (native PowerShell hashtables)
Test Suite Generation
The action automatically discovers and categorizes tests into three types:
- SourceCode tests - Static analysis and linting of source code
- PSModule tests - Tests for the built PowerShell module
- Module tests - Integration and functional tests with test matrices for each OS
Test discovery supports:
*.Configuration.ps1- Test configuration files*.Container.ps1- Test container files*.Tests.ps1- Standard Pester test files
Job Run Conditions
The action calculates intelligent run conditions for each workflow job based on:
- Pull request state (open, updated, merged, abandoned)
- Configuration skip flags
- Test suite availability
- Ensures abandoned PRs don't waste CI resources