Skip to content

Bump PSModule/Process-PSModule/.github/workflows/workflow.yml from 6.1.13 to 8.0.4 - #26

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/PSModule/Process-PSModule/dot-github/workflows/workflow.yml-8.0.4
Open

Bump PSModule/Process-PSModule/.github/workflows/workflow.yml from 6.1.13 to 8.0.4#26
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/PSModule/Process-PSModule/dot-github/workflows/workflow.yml-8.0.4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 9, 2026

Copy link
Copy Markdown

Bumps PSModule/Process-PSModule/.github/workflows/workflow.yml from 6.1.13 to 8.0.4.

Release notes

Sourced from PSModule/Process-PSModule/.github/workflows/workflow.yml's releases.

v8.0.4

🪲 [Fix]: New module versions publish to the PowerShell Gallery (#529)

A module version that has never been published to the PowerShell Gallery can now be published. Any first release, and every subsequent new version, previously failed the Publish-Module stage before the upload was attempted.

Fixed: New module versions publish to the PowerShell Gallery

Publishing a version that is not yet on the PowerShell Gallery now succeeds. The stage checks whether the version already exists so an interrupted run can resume, and treats an absent version as the expected result for a new release rather than an error.

Before this change the Publish-Module job failed with the following, and no module was ever uploaded:

Find-PSResource: Package with name 'MyModule', version '1.3.1' could not be found in repository 'PSGallery'.
Error: Process completed with exit code 1.

No repository configuration changes are needed. A workflow run that previously failed at this point succeeds on re-run.

Resuming an interrupted publication is unchanged: when the version is already on the Gallery, the run skips the upload and continues to GitHub release creation.


  • .github/actions/Publish-PSModule/src/publish.ps1 — the Gallery existence probe in the Publish to PSGallery region ran Find-PSResource with -ErrorAction Stop. Microsoft.PowerShell.PSResourceGet raises PackageNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource when the requested version does not exist, which -ErrorAction Stop turns into a throw, so the probe made a missing version fatal instead of returning $null. The probe now keeps -ErrorAction Stop and catches only PackageNotFound, treating that one error as 'not yet published' and letting the if ($publishedPackage) branch decide the outcome. Every other error stays fatal, so a transient Gallery failure cannot be misread as 'version absent' and cause a re-upload of a version that already exists.
  • The probe was introduced in PSModule/Process-PSModule#512 to make Gallery publication idempotent for the default-branch push release path. That path replaced a try/catch around Publish-PSResource, which is why the regression reached main without an existing test catching it.
  • .github/actions/Publish-PSModule/tests/Publish-PSModule.Recovery.Tests.ps1 — the harness could not observe whether publication happened, so its assertions were vacuous: Publish-PSResource was shimmed to set $script:publishInvoked, but publish.ps1 runs in its own scope via &, so the flag never propagated and stayed $false regardless. Replaced with a hashtable captured by GetNewClosure(), which is shared by reference. A second variant wrote a marker file under $env:GITHUB_WORKSPACE; that is process-wide and races between parallel Pester runspaces, so the marker could land in another test file's TestDrive. The not-found shim also used $PSCmdlet.ThrowTerminatingError(...), which ignores -ErrorAction and therefore threw under both Stop and SilentlyContinue — unable to distinguish the fix from the defect. It now uses Write-Error with the real PackageNotFound error ID, matching how the cmdlet actually behaves. Added a case asserting a non-PackageNotFound lookup failure stays fatal and does not publish. Each test was verified to fail against the specific defect it guards.
  • .github/actions/Release-PSModule/tests/Release-PSModule.WhatIf.Tests.ps1 and Publish-PSModule.Recovery.Tests.ps1 — shim teardown used Remove-Item -Path function:global:X. Set-Item accepts that path and creates X in the global scope, but Remove-Item and Get-Item do not resolve it back, and fail silently rather than erroring, so the cleanup was a no-op. The shims survived AfterAll and shadowed the real commands for later test files, which is what made Test-Actions fail with A parameter cannot be found that matches parameter name 'Prerelease' in Get-NextPrereleaseNumber. Teardown now removes by name.
  • Validated end to end in MariusStorhaug/MariusTestModule ([PR #63](MariusStorhaug/MariusTestModule#63)) with the caller pointed at this branch. A new version published successfully (run 33597824748), and re-running the same job with the version present skipped the upload via the resume path (re-run). Both branches of the probe are confirmed against the live Gallery.
  • Out of scope, found while reproducing: a workflow_dispatch on the default branch resolves no associated pull request, because pull request association in .github/actions/Get-PSModuleSettings/src/main.ps1 is gated on $isPush. A manual recovery run therefore discards the merged pull request's version label and silently resolves a Patch bump. This is a separate defect in version resolution and is recorded in the analysis on PSModule/Process-PSModule#528; it is not addressed here.
  • Also out of scope: .github/workflows/Test-Actions.yml builds a Pester configuration with Run.Parallel and Run.Shuffle, asserts the options applied, then discards it and creates a fresh New-PesterConfiguration for the actual run. Parallel and shuffle are validated but never used, which is why the GITHUB_WORKSPACE race above could not surface in CI. The suite now passes both sequentially and under the intended parallel configuration, so enabling it should be safe.
Changed surface Standards checked Framework docs checked Result
.github/actions/Publish-PSModule/src/** (PowerShell) Coding standards, error handling Publish stage contract Aligned
.github/actions/Publish-PSModule/tests/** (Pester) Pester test standards Action test layout Aligned
.github/actions/Release-PSModule/tests/** (Pester) Pester test standards Action test layout Aligned

Related work

... (truncated)

Commits
  • 68696b6 🪲 [Fix]: New module versions publish to the PowerShell Gallery (#529)
  • 59e056c ⚙️ [Maintenance]: PowerShell guidance scripts are centrally available (#508)
  • 0e45a1c feat: publish PSModule process marketplace (#520)
  • 16419d0 Upgrade Process-PSModule to Pester 6.1 (#519)
  • 7c8bc79 fix: Skip docs verification for closed pull requests (#522)
  • bb49389 🪲 [Fix]: Obsolete GitHub token write permissions removed (#521)
  • 8414050 Bump the github-actions group with 2 updates (#511)
  • 5a11e8e 🌟 [Major]: Publish stable releases from default-branch pushes (#512)
  • 68a2a7f 🌟 [Major]: Reusable workflows now use GitHub App orchestration and explicit p...
  • 15c2814 ⚙️ [Maintenance]: Publish and release execution paths are now decoupled (#407)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [PSModule/Process-PSModule/.github/workflows/workflow.yml](https://github.com/psmodule/process-psmodule) from 6.1.13 to 8.0.4.
- [Release notes](https://github.com/psmodule/process-psmodule/releases)
- [Commits](PSModule/Process-PSModule@fb1bdb8...68696b6)

---
updated-dependencies:
- dependency-name: PSModule/Process-PSModule/.github/workflows/workflow.yml
  dependency-version: 8.0.4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github-actions Pull requests that update GitHub Actions code major Breaking change, version x.0.0 increase labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github-actions Pull requests that update GitHub Actions code major Breaking change, version x.0.0 increase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants