🚀 [Feature]: Release-triggering file patterns now configurable via workflow input#301
Draft
Marius Storhaug (MariusStorhaug) wants to merge 3 commits intomainfrom
Draft
Conversation
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
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
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repositories can now control which file changes trigger build, test, and publish stages through a new
ImportantFilePatternssetting. Previously, only changes tosrc/andREADME.mdwere 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:Via workflow input (newline-separated) — used when settings file does not define it:
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: AddedImportantFilePatternsstring input, passed through toGet-Settingsjob.Get-Settings.yml: Added matching input, passed through toGet-PSModuleSettingsaction. Bumped action reference tov1.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.