🩹 [Patch] Workflow improvements (#12)
This release introduces several improvements to the GitHub Actions workflows and the main PowerShell script for the repository. The main focus is to optimize CI/CD runs by detecting whether a pull request includes changes to important files (such as source code, examples, documentation, or workflow configurations). Build, test, and publish stages are now conditionally executed based on this detection, which helps save CI resources and provides clear feedback to contributors. Additionally, the workflows and dependencies have been updated and refactored for clarity and maintainability.
Workflow optimization and conditional execution:
- Added logic in
src/main.ps1to detect if a PR changes important files (src/**,examples/**,README.md,.github/workflows/Process-PSModule.yml). If not, build/test stages are skipped, and a comment is added to the PR explaining why. This is also reflected in the newHasImportantChangesproperty in both the script andSettings.schema.json. - Updated the calculation of release and prerelease conditions to require important file changes for these actions, preventing unnecessary releases for trivial PRs.
- Refined job run conditions throughout the workflow to only run build, test, and publish steps if important files have changed, further optimizing CI usage.
Workflow and dependency updates:
- Updated
actions/checkoutandPSModule/GitHub-Scriptactions to their latest versions in all workflow files andaction.ymlfor improved security and features. - Changed the script path in
action.ymlto usesrc/main.ps1instead of the oldscripts/main.ps1location. - Renamed and refactored the release workflow from
Auto-ReleasetoRelease, updated its triggering conditions, and switched to the newPSModule/Release-GHRepositoryaction for releases.
Cleanup and configuration changes:
- Removed the
.github/linters/.jscpd.jsonconfiguration file, possibly as part of linter or duplication check cleanup. - Renamed and relocated schema and script files for clarity and better organization (e.g.,
scripts/Settings.schema.jsontosrc/Settings.schema.json).
These changes collectively make the CI/CD workflows more efficient, transparent, and easier to maintain.