🚀 [Feature]: Release-triggering file patterns now configurable (#19)
Repositories can now configure which file changes trigger build, test, and publish stages. Previously, only changes to src/ and README.md were recognized as significant — this was hardcoded and could not be overridden. Repositories that ship additional important files (e.g., examples/, custom config) can now declare their own patterns through the settings file or the action input.
New: Configurable important file patterns
The ImportantFilePatterns setting accepts an array of regex patterns. When a PR changes only files that don't match any pattern, build/test/publish stages are skipped.
Via settings file (.github/PSModule.yml):
ImportantFilePatterns:
- '^src/'
- '^README\.md$'
- '^examples/'Via action input (newline-separated):
- uses: PSModule/Get-PSModuleSettings@v1
with:
ImportantFilePatterns: |
^src/
^README\.md$
^examples/The setting fully replaces the defaults when configured. Include the default patterns in your list if you still want them.
Resolution order: settings file → action input → hardcoded fallback (^src/, ^README\.md$).
Changed: PR skip comment now reflects configured patterns
The PR comment posted when no important files changed now dynamically lists the actual patterns in effect, rather than a hardcoded table.
Technical Details
action.yml: AddedImportantFilePatternsinput with newline-separated default and correspondingPSMODULE_GET_SETTINGS_INPUT_ImportantFilePatternsenv var.Settings.schema.json: Added top-levelImportantFilePatternsproperty as array of strings.main.ps1: Added resolution logic (settings file → parsed input → hardcoded default). Replaced hardcoded$importantPatternsarray with$settings.ImportantFilePatterns. Refactored PR comment to generate the pattern table dynamically.README.md: Documented the new input and settings file property with examples.