Refactor version resolution logic into helper functions (#2)
Summary
Refactor the action script by moving the version resolution workflow out of scripts/main.ps1 and into a dedicated scripts/Helpers.psm1 module.
This keeps main.ps1 as a thin orchestrator and makes the individual steps easier to read, compare, and validate.
Changes
- extract action input parsing into
Read-ActionInput - extract publish settings parsing into
Get-PublishConfiguration - extract pull request event loading into
Get-GitHubPullRequest - extract release decision logic into
Resolve-ReleaseDecision - extract GitHub and PowerShell Gallery version lookups into dedicated helpers
- extract next-version calculation and action output writing into dedicated helpers
- update
scripts/main.ps1to orchestrate the helper calls
Notes
- Intended behavior is unchanged for the normal release/version resolution path.
- Error handling now throws from helper functions instead of using inline
Write-Error/exitinmain.ps1.
Validation
- verified the refactor against
mainwithgit diff --function-context - verified both edited PowerShell files report no editor errors locally