Skip to content

Releases: PSModule/Resolve-PSModuleVersion

v1.1.5

Choose a tag to compare

@github-actions github-actions released this 11 Jul 13:21
6a59a88

🪲 [Fix]: Resolve to the current version on non-PR events (workflow_dispatch, schedule) (#10)

On non–pull-request events (for example workflow_dispatch and schedule), the action now resolves to the current published version instead of throwing. This is the root-cause fix for the Plan failures consumers see on scheduled and manual runs.

Fixed: no more throw on non–pull-request events

Previously the action required a pull_request payload and threw "...must be run from a pull_request event" on any other event. Because Process-PSModule's Plan job runs this on every event, that failed the whole run on schedule / workflow_dispatch for every consumer.

Now, when the event has no pull_request, Get-GitHubPullRequest returns $null and the caller resolves a no-op decision: no bump, no prerelease, nothing published — so Get-NextModuleVersion returns the current published version unchanged.

New: non-PR runs report the current version

There are no PR labels on workflow_dispatch / schedule, so there's nothing to bump from. The action keeps the latest published version (GitHub Release / PS Gallery), which is what a scheduled or manual re-test should build and test against. For a module that has never been released this floors at 0.0.0. Pull-request and merge-to-default-branch behavior is unchanged — labels drive the bump, with patch as the default.

Technical Details

  • scripts/Resolve-PSModuleVersion.Helpers.psm1: Get-GitHubPullRequest returns $null on a non-PR event instead of throwing.
  • scripts/main.ps1: builds a no-op release decision (all flags false, empty prerelease) when there is no pull request, otherwise calls Resolve-ReleaseDecision as before. Get-NextModuleVersion then returns LatestVersion unchanged.
  • tests/: added cases asserting the no-op decision keeps the current version (1.2.3 and the 0.0.0 floor) with no bump and no prerelease. Full suite: 159 passed, PSScriptAnalyzer clean.
  • Follow-up: once released, Process-PSModule bumps its Resolve-Version pin to this version, which lets its Plan.yml gate + 999.0.0 fallback in PR #375 be dropped.

v1.1.4

Choose a tag to compare

@github-actions github-actions released this 10 Jul 21:55
8d1dac7

🪲 [Fix]: Version previews reflect the version-bump label regardless of release type (#9)

Version-bump labels (major, minor, patch) are now always evaluated when resolving a module version, so the version a run reports always matches what those labels would produce. Previously, on pull_request events (ReleaseType = None) the resolver ignored the labels and always previewed a patch prerelease, which made pull request previews misleading. ReleaseType — and the prerelease label that drives it — now only controls whether and how a version is published, never the size of the version increment.

Fixed: Pull request previews now reflect the version-bump label

The resolved version on a non-publishing run now reflects the bump label instead of always showing a patch. Publishing behavior is unchanged — only the previewed version changes for label combinations that were previously never evaluated.

Situation Before After
Open PR, minor label, no prerelease label x.y.z+1 patch preview x.(y+1).0 minor preview (still not published)
Open PR, major label, no prerelease label x.y.z+1 patch preview (x+1).0.0 major preview (still not published)
PR with prerelease label publishes a prerelease unchanged — prerelease still gates publishing
Merge to main with minor label minor release unchanged

Technical Details

  • scripts/Resolve-PSModuleVersion.Helpers.psm1 (Resolve-ReleaseDecision): the major/minor/patch label evaluation was moved out from behind the if ($shouldPublish) guard so it always runs. When no bump label is present and AutoPatching is disabled, the run still previews a patch version but sets ShouldPublish = $false. Any run that is not a published full release continues to be surfaced as a prerelease (CreatePrerelease = $true).
  • tests/Resolve-PSModuleVersion.Helpers.Tests.Data.psd1: added ReleaseDecision and EndToEnd cases for None + minor and None + major previews. All existing ReleaseDecision, EndToEnd, and NextModuleVersion cases are unchanged.
  • Validation: 157/157 Pester tests pass; PSScriptAnalyzer clean.
  • E2E: MariusStorhaug/MariusTestModule PR #34 (labelled Minor, no prerelease label) now previews v0.5.0-teste2eimporttestdata001 with ShouldPublish = False (previously v0.4.2-…).
  • Relates to PSModule/Process-PSModule#378.

v1.1.3

Choose a tag to compare

@github-actions github-actions released this 10 Jul 09:21
bc63f07

Bump actions/checkout from 6.0.2 to 7.0.0 (#6)

Bumps actions/checkout from 6.0.2 to 7.0.0.

Release notes

Sourced from actions/checkout's releases.

v7.0.0

What's Changed

New Contributors

Full Changelog: actions/checkout@v6.0.3...v7.0.0

v6.0.3

What's Changed

New Contributors

Full Changelog: actions/checkout@v6...v6.0.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v7.0.0

v6.0.3

v6.0.2

v6.0.1

v6.0.0

v5.0.1

v5.0.0

v4.3.1

v4.3.0

v4.2.2

  • url-helper.ts now leverages well-known environment variables by @​jww3 in
Read more

v1.1.2

Choose a tag to compare

@github-actions github-actions released this 10 Jul 09:16
7b23a70

Bump super-linter/super-linter from 8.6.0 to 8.7.0 (#7)

Bumps super-linter/super-linter from 8.6.0 to 8.7.0.

Release notes

Sourced from super-linter/super-linter's releases.

v8.7.0

8.7.0 (2026-06-18)

🚀 Features

🐛 Bugfixes

⬆️ Dependency updates

  • bundler: bump rubocop (#7923) (0738987)
  • bundler: bump rubocop in /dependencies in the rubocop group (#7731) (bf2414c)
  • bundler: bump rubocop-capybara (#7781) (35ef3f6)
  • bundler: bump the rubocop group across 1 directory with 2 updates (#7816) (5a6de32)
  • bundler: bump the rubocop group across 1 directory with 3 updates (#7875) (4d01de2)
  • bundler: bump the rubocop group in /dependencies with 2 updates (#7890) (cd79eea)
  • docker: bump dart in the docker group (#7755) (86c9c54)
  • docker: bump goreleaser/goreleaser in the docker group (#7705) (487d0d8)
  • docker: bump mvdan/shfmt in the docker group (#7718) (a1fc30a)
  • docker: bump python (#7730) (c5fb918)
  • docker: bump the docker group across 1 directory with 10 updates (#7817) (5e3985b)
  • docker: bump the docker group across 1 directory with 11 updates (#7876) (9bc8ec9)
  • docker: bump the docker group across 1 directory with 3 updates (#7765) (d9f1398)
  • docker: bump the docker group across 1 directory with 5 updates (#7786) (b7ba6a5)
  • docker: bump the docker group across 1 directory with 6 updates (#7912) (7b70a50)
  • docker: bump the docker group across 1 directory with 8 updates (#7753) (3fec5a3)
  • java: bump com.puppycrawl.tools:checkstyle (#7788) (4a69c1a)
  • java: bump com.puppycrawl.tools:checkstyle (#7914) (65ad252)
  • npm: bump @​hono/node-server in /dependencies (#7720) (a8c6363)
  • npm: bump @​protobufjs/utf8 from 1.1.0 to 1.1.1 in /dependencies (#7812) (0651d17)
  • npm: bump @​stoplight/spectral-cli in /dependencies (#7743) (fd0d01c)
  • npm: bump @​stoplight/spectral-cli in /dependencies (#7814) (813e4fb)
  • npm: bump brace-expansion (#7840) (f6e64b5)
  • npm: bump fast-uri from 3.0.6 to 3.1.2 in /dependencies (#7803) (9253b88)
  • npm: bump fast-xml-builder from 1.1.4 to 1.2.0 in /dependencies (#7802) (5b044ae)
  • npm: bump hono from 4.12.14 to 4.12.18 in /dependencies (
Read more

v1.1.1

Choose a tag to compare

@github-actions github-actions released this 10 Jul 09:15
db83999

🩹 [Patch]: Name the helper module after the action (Resolve-PSModuleVersion.Helpers) (#8)

Aligns the helper module with the action helper-module naming standard: name it after the action (Resolve-PSModuleVersion.Helpers) instead of a generic name.

PR #4 introduced the interim name ResolveVersion to fix the Helpers collision; this brings it to the ecosystem-wide convention (<Action>.Helpers) now that the standard is in place.

Changes

  • scripts/ResolveVersion.psm1scripts/Resolve-PSModuleVersion.Helpers.psm1
  • tests/ResolveVersion.Tests.ps1tests/Resolve-PSModuleVersion.Helpers.Tests.ps1
  • tests/ResolveVersion.Tests.Data.psd1tests/Resolve-PSModuleVersion.Helpers.Tests.Data.psd1
  • Updated the entry-script import (scripts/main.ps1), the test module import, the test data-file path, and the two Mock -ModuleName references. Kept the framework Import-Module -Name 'Helpers'.

No runtime logic changed (100% file rename + reference updates).

Validation

Tests pass 131/131 under a simulated Helpers name collision (a second module named Helpers loaded before Invoke-Pester). PSScriptAnalyzer clean apart from the pre-existing PSAvoidUsingWriteHost warnings (unchanged module body).

Part of PSModule/Process-PSModule#364. Standard: the "Name helper modules after the action" rule in the GitHub Actions coding standard (MSXOrg/docs#24).

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 22:55
d53326c

🚀 [Feature]: Version output always emitted regardless of publish decision (#4)

The action now always emits a valid Version and FullVersion output, even when no release will be created. Non-publishable builds receive a development prerelease version so downstream jobs always have a version to stamp into the artifact.

New: Development prerelease version for non-publishable builds

When ShouldPublish is false, the action now emits a development prerelease version (e.g. 1.2.4-mybranch001) instead of empty strings. The CreateRelease output remains false — downstream jobs continue to use this flag to gate publishing.

When ShouldPublish is true, behavior is unchanged.

Technical Details

  • Moved version resolution (GitHub releases + PSGallery query) outside the ShouldPublish conditional so it always executes.
  • When ShouldPublish is false, the existing Get-NextModuleVersion is called with a forced patch bump and the branch-based prerelease tag (reusing existing IncrementalPrerelease / DatePrereleaseFormat logic).
  • Made Write-ActionOutput's NewVersion parameter mandatory (always receives a value now).
  • Added Pester tests covering all non-publish scenarios and existing bump behavior.
  • Implementation plan progress: Core changes and Tests tasks in PSModule/Process-PSModule#348 completed; Validation task remains.
Related issues

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 24 May 10:08
65b7cb0

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.ps1 to 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/exit in main.ps1.

Validation

  • verified the refactor against main with git diff --function-context
  • verified both edited PowerShell files report no editor errors locally

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 May 23:13
3237617

🌟 [Major]: Module version resolution now available as a standalone action (#1)

Module version resolution is now available as a standalone action. Workflows can call it before building so the resolved version is stamped into the artifact at build time, making the bytes that are tested the bytes that ship.

New: Standalone Resolve-PSModuleVersion action

The action consumes the JSON Settings output from PSModule/Get-PSModuleSettings and emits:

Output Description
Version Major.Minor.Patch portion of the resolved version.
Prerelease Prerelease tag, empty when not a prerelease.
FullVersion Full version string including VersionPrefix and prerelease tag.
ReleaseType Release, Prerelease, or None when no version bump label is present.
CreateRelease true when a release or prerelease should be created.

Typical usage in the Plan job:

- name: Resolve module version
  id: resolve
  uses: PSModule/Resolve-PSModuleVersion@v1
  env:
    GH_TOKEN: ${{ github.token }}
  with:
    Settings: ${{ steps.settings.outputs.Settings }}

- name: Build module
  uses: PSModule/Build-PSModule@v5
  with:
    Version: ${{ steps.resolve.outputs.Version }}
    Prerelease: ${{ steps.resolve.outputs.Prerelease }}

The action validates Settings.Publish.Module.ReleaseType, applies IgnoreLabels overrides, picks the bump type from PR labels (MajorLabels > MinorLabels > PatchLabels / AutoPatching), then computes the next version from the higher of the latest GitHub Release and the latest PowerShell Gallery version. For prereleases it appends the sanitized branch name, optional DatePrereleaseFormat timestamp, and an incremental counter calculated from existing prereleases on the same baseline + branch.

Technical Details

  • action.yml: composite action with inputs Settings (required JSON), Name, WorkingDirectory, Debug, Verbose, Version, Prerelease, plus EventPath and EventJson (both optional, for test overrides — EventJson takes precedence over reading the file at EventPath). All ${{ }} template expressions are isolated in env: sections per zizmor template-injection requirements. Installs PSModule/Install-PSModuleHelpers and PSSemVer before running the script.
  • scripts/main.ps1: ports the version-resolution logic that previously lived in Publish-PSModule/src/init.ps1. Reads configuration from PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_Settings JSON instead of separate env vars. Reads the PR event from PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_EventJson when set, falling back to the file at GITHUB_EVENT_PATH. Emits outputs via $env:GITHUB_OUTPUT. Cleanup-tag discovery stays in Publish-PSModule/cleanup.ps1 and is intentionally out of scope here.
  • .github/workflows/Action-Test.yml: 6 test jobs covering patch, minor, major, auto-patch, ignore-label, and None scenarios. The ignore-label job passes the fake PR event as a JSON string via EventJson to bypass the runner's real event file, which cannot be reliably overridden at the file-system level.
  • README.md: replaces the template scaffold with the action's contract and usage examples.

Implementation plan progress (PSModule/Process-PSModule#326):

  • ✅ Create Resolve-PSModuleVersion (LICENSE, README, action.yml, scripts/main.ps1, Action-Test workflow)
  • ✅ Inputs: Settings, Name, WorkingDirectory (plus EventPath/EventJson for test overrides)
  • ✅ Outputs: Version, Prerelease, FullVersion, ReleaseType, CreateRelease
  • ✅ Port version-resolution logic from Publish-PSModule/src/init.ps1 (PSSemVer install, GitHub Releases query, PSGallery query, PR-label parsing, bump selection, prerelease sequencing, DatePrereleaseFormat, VersionPrefix)
  • ⬜ Dedicated Pester unit tests for label parsing, bump selection, and prerelease sequencing — covered by the six integration test jobs; a focused unit-test suite remains open

Related PRs: