🚀 [Feature]: Release-triggering file patterns now configurable via workflow input (#301)
Repositories can now control which file changes trigger build, test, and publish stages by configuring the ImportantFilePatterns workflow input or settings file property. The default patterns (^src/ and ^README\.md$) remain unchanged for backward compatibility.
- Fixes #278
New: Configurable release-triggering file patterns
The ImportantFilePatterns input is now available on the workflow.yml and Get-Settings.yml reusable workflows. Pass a newline-separated list of regex patterns to override the defaults:
jobs:
Process:
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
with:
ImportantFilePatterns: |
^src/
^README\.md$
^examples/To disable file-change triggering entirely, pass an empty string via the workflow input or set an empty list in .github/PSModule.yml:
# In .github/PSModule.yml
ImportantFilePatterns: []Resolution order: settings file → workflow input → workflow input default values.
Changed: PR comment reflects configured patterns
The automated comment posted on PRs when no important files are changed now dynamically lists the configured patterns instead of a hardcoded table.
Technical Details
- Added
ImportantFilePatternsinput (type:string, newline-separated) to both.github/workflows/workflow.ymland.github/workflows/Get-Settings.ymlwith explicit defaults (^src/and^README\.md$). - Bumped
Get-PSModuleSettingsaction reference fromv1.4.4tov1.5.0which implements the settings file and action input support for this feature. - Passed
ImportantFilePatternsinput through the reusable workflow chain to theGet-PSModuleSettingsaction step. - Updated README documentation: new input in the workflow inputs table, new "Customizing important file patterns" section with YAML examples, updated settings file reference and example schema.