Skip to content

🚀 [Feature]: Release-triggering file patterns now configurable via workflow input#301

Draft
Marius Storhaug (MariusStorhaug) wants to merge 3 commits intomainfrom
feature/configurable-important-file-patterns
Draft

🚀 [Feature]: Release-triggering file patterns now configurable via workflow input#301
Marius Storhaug (MariusStorhaug) wants to merge 3 commits intomainfrom
feature/configurable-important-file-patterns

Conversation

@MariusStorhaug
Copy link
Copy Markdown
Member

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Mar 27, 2026

Repositories can now control which file changes trigger build, test, and publish stages through a new ImportantFilePatterns setting. 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.

New: Configurable important file patterns

Two ways to configure which files trigger releases:

Via settings file (.github/PSModule.yml) — takes highest priority:

ImportantFilePatterns:
  - '^src/'
  - '^README\.md$'
  - '^examples/'

Via workflow input (newline-separated) — used when settings file does not define it:

jobs:
  Process:
    uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v1
    with:
      ImportantFilePatterns: |
        ^src/
        ^README\.md$
        ^examples/

Resolution order: settings file → workflow input → hardcoded defaults (^src/, ^README\.md$).

The setting fully replaces the defaults when configured — include the default patterns in your list if you still want them. An empty array (ImportantFilePatterns: []) is a valid override that means no file changes trigger releases.

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, with proper Markdown escaping for patterns containing pipes or backticks.

Changed: Invalid patterns now fail fast

User-provided patterns are validated as regular expressions at settings resolution time. Invalid patterns produce a clear error message instead of crashing during the file-change detection loop.

Technical Details

  • workflow.yml: Added ImportantFilePatterns string input, passed through to Get-Settings job.
  • Get-Settings.yml: Added matching input, passed through to Get-PSModuleSettings action. Bumped action reference to v1.5.0 (1e3d156).
  • README.md: Documented the new input in the Inputs table, Configuration table, defaults YAML example, and rewrote the "Important file change detection" section with both configuration methods and resolution order.

@github-actions
Copy link
Copy Markdown

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

Build, test, and publish stages will be skipped for this PR.

If you believe this is incorrect, please verify that your changes are in the correct locations.

1 similar comment
@github-actions
Copy link
Copy Markdown

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

Build, test, and publish stages will be skipped for this PR.

If you believe this is incorrect, please verify that your changes are in the correct locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make release-triggering file patterns configurable via settings file

1 participant