diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json deleted file mode 100644 index 15d4513d..00000000 --- a/.github/linters/.jscpd.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "threshold": 0, - "reporters": [ - "consoleFull" - ], - "ignore": [ - "**/tests/**", - "**/workflows/**" - ], - "absolute": true -} diff --git a/.github/prompts/PSModule.pr.prompt.md b/.github/prompts/PSModule.pr.prompt.md index 75661c9a..0787c242 100644 --- a/.github/prompts/PSModule.pr.prompt.md +++ b/.github/prompts/PSModule.pr.prompt.md @@ -6,6 +6,8 @@ description: Create a pull request with a release note style description, approp The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty). +Use the GitHub MCP tools to create or update a pull request in the appropriate repository (fork or origin mode), with a structured release note style description, a title that includes an icon and change type, and labels based on the specified change type. + ## User input $ARGUMENTS @@ -14,13 +16,13 @@ $ARGUMENTS ## Supported Change Types -| Type | Icon | Labels | Description | -| ----- | ---- | -------------- | ------------------------------------------ | -| Major | 🌟 | `Major` | Breaking changes that affect compatibility | -| Minor | 🚀 | `Minor` | New features or enhancements | -| Patch | 🩹 | `Patch` | Small fixes or improvements | -| Fix | 🪲 | `Fix`, `Patch` | Bugfixes | -| Docs | 📖 | `Docs` | Documentation changes only | +| Type | Icon | Labels | Description | +| ----------- | ---- | -------------- | -------------------------------------------| +| Major | 🌟 | `Major` | Breaking changes that affect compatibility | +| Minor | 🚀 | `Minor` | New features or enhancements | +| Patch | 🩹 | `Patch` | Small fixes or improvements | +| Docs | 📖 | `NoRelease` | Documentation changes only | +| Maintenance | ⚙️ | `NoRelease` | CI/CD, build configs, internal maintenance | ## Execution Steps @@ -37,13 +39,13 @@ $ARGUMENTS - If in doubt, ask the user to clarify which repository to target. 2. **Determine the change type**: - 1. Parse the user input to identify the change type (Major, Minor, Patch, Fix, or Docs) + 1. Parse the user input to identify the change type (Major, Minor, Patch, Fix, Docs, or Maintenance) 2. If nothing is provided, **analyze ALL changes in the branch** to infer the type: - Run `git diff origin/main...HEAD --name-only` to get all changed files in the branch - Read the diff content using `git diff origin/main...HEAD` to understand the nature of changes - Categorize based on ALL changes combined, not just recent commits: + * **Maintenance**: CI/CD workflows, build configs, dependency updates, or internal tooling with no user-facing changes * **Docs**: ONLY if ALL changes are to documentation files (*.md, docs/, .github/prompts/, etc.) with no code/functionality changes - * **Fix**: If changes specifically fix bugs without adding new features * **Patch**: Small fixes or improvements that do not add new features * **Minor**: New features or enhancements that do not break existing functionality * **Major**: Changes that break backward compatibility (e.g., removing public APIs, changing method signatures) @@ -69,11 +71,12 @@ $ARGUMENTS - Stop if the user cannot provide either of these. 5. **Generate PR title**: - - **If issue title retrieved**: Use format ` ` + - **If issue title retrieved**: Use format ` []: ` - Examples: - `🚀 [Feature]: Add support for custom module templates` - `🪲 [Fix]: Resolve null reference in parameter validation` - `📖 [Docs]: Update installation guide with prerequisites` + - `⚙️ [Maintenance]: Update Release workflow and dependencies` 6. **Generate release note style description**: - The PR description will be used automatically as the release note in an automated release @@ -139,8 +142,7 @@ $ARGUMENTS - Add labels to PR - owner/repo should be target repository, use `update_issue` (PRs are issues in GitHub API) 8. **Apply labels to the PR**: - - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, or Docs) - - For Fix type, add both `Fix` and `Patch` labels + - Add the **change type label** based on the type specified (Major, Minor, Patch, Fix, Docs, or Maintenance) - If currently in a feature workflow phase (e.g., Planning, Implementation), also apply that phase label - Use GitHub MCP to add labels in the **target repository** (upstream in fork mode, origin otherwise) @@ -149,14 +151,6 @@ $ARGUMENTS - Summarize the PR title, type, and labels applied - If in fork mode, remind the user that the PR was created in the upstream repository -## Example usage - -- `/PR` - Create a PR for the current changes -- `/PR Minor` - Create a PR for a new feature -- `/PR Fix` - Create a PR for a bugfix -- `/PR Docs` - Create a PR for documentation changes -- `/PR Major` - Create a PR for breaking changes -- `/PR Patch` - Create a PR for small improvements ## Notes diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 35c6ae86..00000000 --- a/.github/release.yml +++ /dev/null @@ -1,18 +0,0 @@ -# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes - -changelog: - exclude: - labels: - - NoRelease - categories: - - title: 🌟 Breaking Changes - labels: - - Major - - Breaking - - title: 🚀 New Features - labels: - - Minor - - Feature - - title: Other Changes - labels: - - '*' diff --git a/.github/workflows/AfterAll-ModuleLocal.yml b/.github/workflows/AfterAll-ModuleLocal.yml index fc0c005b..e3782e44 100644 --- a/.github/workflows/AfterAll-ModuleLocal.yml +++ b/.github/workflows/AfterAll-ModuleLocal.yml @@ -50,14 +50,14 @@ jobs: SETTINGS: ${{ inputs.Settings }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Run AfterAll Teardown Scripts if: always() - uses: PSModule/GitHub-Script@2010983167dc7a41bcd84cb88e698ec18eccb7ca # v1.7.8 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Name: AfterAll-ModuleLocal ShowInfo: false diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 3b7d8e9e..fd6201aa 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -26,11 +26,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Auto-Release - uses: PSModule/Auto-Release@eabd533035e2cb9822160f26f2eda584bd012356 # v1.9.5 + uses: PSModule/Release-GHRepository@5a5165d66f485d1aad217ef34a190178b214fdcb # v2.0.2 with: IncrementalPrerelease: false diff --git a/.github/workflows/BeforeAll-ModuleLocal.yml b/.github/workflows/BeforeAll-ModuleLocal.yml index 62097690..df20d30a 100644 --- a/.github/workflows/BeforeAll-ModuleLocal.yml +++ b/.github/workflows/BeforeAll-ModuleLocal.yml @@ -50,13 +50,13 @@ jobs: Settings: ${{ inputs.Settings }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Run BeforeAll Setup Scripts - uses: PSModule/GitHub-Script@2010983167dc7a41bcd84cb88e698ec18eccb7ca # v1.7.8 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Name: BeforeAll-ModuleLocal ShowInfo: false diff --git a/.github/workflows/Build-Docs.yml b/.github/workflows/Build-Docs.yml index 3336fdcb..2e9f948e 100644 --- a/.github/workflows/Build-Docs.yml +++ b/.github/workflows/Build-Docs.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 @@ -30,7 +30,7 @@ jobs: path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module - name: Document module - uses: PSModule/Document-PSModule@51affc52831fa82500bea2a41f02abef9a9cfdc1 # v1.0.14 + uses: PSModule/Document-PSModule@dc5b329f840f7803ec02d34a42ee725bca39db5f # v1.0.16 with: Name: ${{ fromJson(inputs.Settings).Name }} WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }} @@ -44,7 +44,7 @@ jobs: retention-days: 1 - name: Commit all changes - uses: PSModule/GitHub-Script@2010983167dc7a41bcd84cb88e698ec18eccb7ca # v1.7.8 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Debug: ${{ fromJson(inputs.Settings).Debug }} Prerelease: ${{ fromJson(inputs.Settings).Prerelease }} diff --git a/.github/workflows/Build-Module.yml b/.github/workflows/Build-Module.yml index 11248d2c..117f374b 100644 --- a/.github/workflows/Build-Module.yml +++ b/.github/workflows/Build-Module.yml @@ -24,13 +24,13 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Build module - uses: PSModule/Build-PSModule@fe8cc14a7192066cc46cb9514659772ebde05849 # v4.0.9 + uses: PSModule/Build-PSModule@869da3f28cbb5c04c6868dded0d511a40f191a59 # v4.0.12 with: Name: ${{ fromJson(inputs.Settings).Name }} ArtifactName: ${{ inputs.ArtifactName }} diff --git a/.github/workflows/Build-Site.yml b/.github/workflows/Build-Site.yml index b10701dc..5562b1fd 100644 --- a/.github/workflows/Build-Site.yml +++ b/.github/workflows/Build-Site.yml @@ -17,13 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Install-PSModuleHelpers - uses: PSModule/Install-PSModuleHelpers@d60d63e4be477d1ca0c67c6085101fb109bce8f1 # v1.0.6 + uses: PSModule/Install-PSModuleHelpers@ed79b6e3aa8c9cd3d30ab2bf02ea6bd4687b9c74 # v1.0.7 - name: Download docs artifact uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 @@ -40,7 +40,7 @@ jobs: pip install mkdocs-git-committers-plugin-2 - name: Structure site - uses: PSModule/GitHub-Script@2010983167dc7a41bcd84cb88e698ec18eccb7ca # v1.7.8 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Debug: ${{ fromJson(inputs.Settings).Debug }} Prerelease: ${{ fromJson(inputs.Settings).Prerelease }} diff --git a/.github/workflows/Get-CodeCoverage.yml b/.github/workflows/Get-CodeCoverage.yml index c473c91b..23051be1 100644 --- a/.github/workflows/Get-CodeCoverage.yml +++ b/.github/workflows/Get-CodeCoverage.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Get-CodeCoverage - uses: PSModule/Get-PesterCodeCoverage@a7923eefbf55b452f9b1534c5b50ca9bd192f810 # v1.0.3 + uses: PSModule/Get-PesterCodeCoverage@a8280e9a8941438f8fc63a4531c3431e4d49015f # v1.0.4 id: Get-CodeCoverage with: CodeCoveragePercentTarget: ${{ fromJson(inputs.Settings).Test.CodeCoverage.PercentTarget }} diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index 4357e302..923296dc 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -39,7 +39,8 @@ on: value: ${{ jobs.Get-Settings.outputs.Settings }} permissions: - contents: read # to checkout the repo + contents: read # to checkout the repo + pull-requests: write # to add labels to PRs jobs: Get-Settings: @@ -49,13 +50,13 @@ jobs: Settings: ${{ steps.Get-Settings.outputs.Settings }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@28c1805d689dc5bfcfba7489e76c34a6d33d7da8 # v1.4.0 + uses: PSModule/Get-PSModuleSettings@3d53e12a48fb35bc68f55ec438f8a14805758009 # v1.4.3 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} diff --git a/.github/workflows/Get-TestResults.yml b/.github/workflows/Get-TestResults.yml index d7f2988a..beabfae4 100644 --- a/.github/workflows/Get-TestResults.yml +++ b/.github/workflows/Get-TestResults.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Get-TestResults - uses: PSModule/Get-PesterTestResults@0c1d8cde9575b192831f76e87d3f7e825a7d8ff4 # v1.0.7 + uses: PSModule/Get-PesterTestResults@616387914e439d7b648e3cfaaf73542f5723ff42 # v1.0.8 id: Get-TestResults with: SourceCodeTestSuites: ${{ toJSON(fromJson(inputs.Settings).TestSuites.SourceCode) }} diff --git a/.github/workflows/Lint-Repository.yml b/.github/workflows/Lint-Repository.yml index 2a7122ec..a9f6445e 100644 --- a/.github/workflows/Lint-Repository.yml +++ b/.github/workflows/Lint-Repository.yml @@ -20,7 +20,7 @@ jobs: Settings: ${{ inputs.Settings }} steps: - name: Checkout repo - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 diff --git a/.github/workflows/Lint-SourceCode.yml b/.github/workflows/Lint-SourceCode.yml index bbe96827..7c6a1632 100644 --- a/.github/workflows/Lint-SourceCode.yml +++ b/.github/workflows/Lint-SourceCode.yml @@ -21,12 +21,12 @@ jobs: include: ${{ fromJson(inputs.Settings).TestSuites.SourceCode }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Lint-SourceCode - uses: PSModule/Invoke-ScriptAnalyzer@0b13023a981f4c94136bba6193a9abd2d936cbc1 # v4.1.1 + uses: PSModule/Invoke-ScriptAnalyzer@17bb50ef88b72e7d723e56b81d2e04f27ddc7e37 # v4.1.2 with: Debug: ${{ fromJson(inputs.Settings).Debug }} Prerelease: ${{ fromJson(inputs.Settings).Prerelease }} diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 6f3ba22a..05f128c8 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 40c6593d..a9d67945 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -24,13 +24,13 @@ jobs: SETTINGS: ${{ inputs.Settings }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Publish module - uses: PSModule/Publish-PSModule@e1b338d1266dee28c6d6218756979597c8a77b7a # v2.2.0 + uses: PSModule/Publish-PSModule@2e548cfd1c68b76129fdeabc7f7caebd47e3b1c3 # v2.2.2 env: GH_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/Test-Module.yml b/.github/workflows/Test-Module.yml index bcedef37..29fdddb9 100644 --- a/.github/workflows/Test-Module.yml +++ b/.github/workflows/Test-Module.yml @@ -52,7 +52,7 @@ jobs: include: ${{ fromJson(inputs.Settings).TestSuites.PSModule }} steps: - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -63,7 +63,7 @@ jobs: path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module - name: Test-Module - uses: PSModule/Test-PSModule@7d94ed751a60973867e84ea8d44521e94b7c485d # v3.0.7 + uses: PSModule/Test-PSModule@d4d6d1d2ac1d243ca82c9c199371533e8d2220ef # v3.0.8 with: Name: ${{ fromJson(inputs.Settings).Name }} Debug: ${{ fromJson(inputs.Settings).Debug }} @@ -82,7 +82,7 @@ jobs: include: ${{ fromJson(inputs.Settings).TestSuites.PSModule }} steps: - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -93,7 +93,7 @@ jobs: path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module - name: Lint-Module - uses: PSModule/Invoke-ScriptAnalyzer@0b13023a981f4c94136bba6193a9abd2d936cbc1 # v4.1.1 + uses: PSModule/Invoke-ScriptAnalyzer@17bb50ef88b72e7d723e56b81d2e04f27ddc7e37 # v4.1.2 with: Path: outputs/module Debug: ${{ fromJson(inputs.Settings).Debug }} diff --git a/.github/workflows/Test-ModuleLocal.yml b/.github/workflows/Test-ModuleLocal.yml index 63b3c1f9..738a0686 100644 --- a/.github/workflows/Test-ModuleLocal.yml +++ b/.github/workflows/Test-ModuleLocal.yml @@ -53,7 +53,7 @@ jobs: include: ${{ fromJson(inputs.Settings).TestSuites.Module }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 @@ -65,7 +65,7 @@ jobs: path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module - name: Install-PSModuleHelpers - uses: PSModule/Install-PSModuleHelpers@d60d63e4be477d1ca0c67c6085101fb109bce8f1 # v1.0.6 + uses: PSModule/Install-PSModuleHelpers@ed79b6e3aa8c9cd3d30ab2bf02ea6bd4687b9c74 # v1.0.7 - name: Import-Module id: import-module @@ -79,7 +79,7 @@ jobs: "path=$path" >> $env:GITHUB_OUTPUT - name: Test-ModuleLocal - uses: PSModule/Invoke-Pester@882994cbe1ff07c3fc8afdac52404c940f99b331 # v4.2.2 + uses: PSModule/Invoke-Pester@1fcb663c0efe914e8374d78e16aa7bb907ea2434 # v4.2.3 with: Debug: ${{ fromJson(inputs.Settings).Debug }} Prerelease: ${{ fromJson(inputs.Settings).Prerelease }} diff --git a/.github/workflows/Test-SourceCode.yml b/.github/workflows/Test-SourceCode.yml index 186b6f16..78ad4041 100644 --- a/.github/workflows/Test-SourceCode.yml +++ b/.github/workflows/Test-SourceCode.yml @@ -21,13 +21,13 @@ jobs: include: ${{ fromJson(inputs.Settings).TestSuites.SourceCode }} steps: - name: Checkout Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Test-SourceCode - uses: PSModule/Test-PSModule@7d94ed751a60973867e84ea8d44521e94b7c485d # v3.0.7 + uses: PSModule/Test-PSModule@d4d6d1d2ac1d243ca82c9c199371533e8d2220ef # v3.0.8 with: Debug: ${{ fromJson(inputs.Settings).Debug }} Prerelease: ${{ fromJson(inputs.Settings).Prerelease }} diff --git a/README.md b/README.md index ecf59711..7553cf89 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,10 @@ Depending on the labels in the pull requests, the [workflow will result in diffe - [Secrets](#secrets) - [Permissions](#permissions) - [Scenario Matrix](#scenario-matrix) + - [Important file change detection](#important-file-change-detection) + - [Files that trigger releases](#files-that-trigger-releases) + - [Files that do NOT trigger releases](#files-that-do-not-trigger-releases) + - [Behavior when no important files are changed](#behavior-when-no-important-files-are-changed) - [Configuration](#configuration) - [Example 1 - Defaults with Code Coverage target](#example-1---defaults-with-code-coverage-target) - [Example 2 - Rapid testing](#example-2---rapid-testing) @@ -104,7 +108,7 @@ Depending on the labels in the pull requests, the [workflow will result in diffe [workflow](#get-settings) - Reads the settings file `github/PSModule.yml` in the module repository to configure the workflow. -- Gathers context for the process from GitHub and the repo files, configuring what tests to run, if and what kind of release to create, and wether +- Gathers context for the process from GitHub and the repo files, configuring what tests to run, if and what kind of release to create, and whether to setup testing infrastructure and what operating systems to run the tests on. ### Build module @@ -361,6 +365,41 @@ This table shows when each job runs based on the trigger scenario: - \*\*\* Cleans up prerelease versions and tags created for the abandoned PR (when `Publish.Module.AutoCleanup` is enabled) +### Important file change detection + +The workflow automatically detects whether a pull request contains changes to "important" files that warrant a new +release. This prevents unnecessary releases when only non-functional files (such as workflow configurations, linter +settings, or test files) are modified. + +#### Files that trigger releases + +| Path | Description | +| :--- | :---------- | +| `src/**` | Module source code | +| `README.md` | Module documentation | + +#### Files that do NOT trigger releases + +Changes to the following files will not trigger a release: + +- `.github/workflows/*` - Workflow configurations +- `.github/linters/*` - Linter configuration files +- `tests/**` - Test files +- `examples/**` - Example scripts +- `.gitignore`, `.editorconfig`, etc. - Repository configuration files + +#### Behavior when no important files are changed + +When a pull request does not contain changes to important files: + +1. A comment is automatically added to the PR explaining why build/test stages are skipped +2. The `ReleaseType` output is set to `None` +3. Build, test, and publish stages are skipped +4. The PR can still be merged for non-release changes (documentation updates, CI improvements, etc.) + +This behavior ensures that maintenance PRs (such as updating GitHub Actions versions or fixing typos in comments) +don't create unnecessary releases in the PowerShell Gallery. + ## Configuration The workflow is configured using a settings file in the module repository.