Skip to content

🩹 [Patch]: Prerelease cleanup no longer depends on module artifact#400

Merged
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
decouple-prerelease-cleanup
Jul 18, 2026
Merged

🩹 [Patch]: Prerelease cleanup no longer depends on module artifact#400
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
decouple-prerelease-cleanup

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Jul 18, 2026

Copy link
Copy Markdown
Member

Prerelease cleanup now runs as an independent workflow action, so publish logic and cleanup logic can execute in the right scenarios without being coupled to module artifact download.

Changed: Publish and cleanup are now separate actions

Publish-PSModule now only performs artifact download and publish/release work, while cleanup moved into a dedicated Cleanup-PSModulePrereleases action.

Fixed: No-build cleanup paths no longer depend on publish action internals

Publish-Module.yml now runs publish only when ReleaseType != 'None', and runs cleanup independently when ReleaseType != 'Prerelease' with existing AutoCleanup and WhatIf controls.

Technical Details

  • Removed cleanup inputs and cleanup step from .github/actions/Publish-PSModule/action.yml.
  • Added .github/actions/Cleanup-PSModulePrereleases/ with its own composite action and cleanup script.
  • Updated .github/workflows/Publish-Module.yml to call the two actions as separate, scenario-gated steps.
  • Preserved release-tag exclusion by passing PSMODULE_PUBLISH_PSMODULE_CONTEXT_ReleaseTag into the cleanup action when publish ran earlier in the job.
  • Implementation plan progress: completed the decoupling requested in issue Decouple prerelease cleanup from the module artifact so Publish-Module succeeds on no-build PRs #376 by separating cleanup from publish artifact flow.
Related issues

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

Super-linter summary

Language Validation result
CHECKOV Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
YAML Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title Decouple prerelease cleanup from module artifact in Publish-Module ⚙️ [Maintenance]: Prerelease cleanup no longer depends on module artifact Jul 18, 2026
Comment thread .github/actions/Cleanup-PSModulePrereleases/action.yml Dismissed
Run prerelease cleanup independently when no module artifact is produced by gating publish-only steps behind CreateRelease and driving cleanup behavior from ReleaseType.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove CreateRelease input and gate publish steps directly on ReleaseType so None means no release flow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Extract prerelease cleanup from Publish-PSModule into Cleanup-PSModulePrereleases and wire Publish-Module workflow to run publish and cleanup as separate scenario-gated steps.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run prerelease cleanup independently when no module artifact is produced by gating publish-only steps behind CreateRelease and driving cleanup behavior from ReleaseType.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove CreateRelease input and gate publish steps directly on ReleaseType so None means no release flow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Extract prerelease cleanup from Publish-PSModule into Cleanup-PSModulePrereleases and wire Publish-Module workflow to run publish and cleanup as separate scenario-gated steps.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use Settings.Publish.Module.Resolution.ReleaseType in Publish-Module workflow to match the enriched settings shape from Plan.yml.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title ⚙️ [Maintenance]: Prerelease cleanup no longer depends on module artifact 🩹 [Patch]: Prerelease cleanup no longer depends on module artifact Jul 18, 2026
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 0307c0d into main Jul 18, 2026
69 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the decouple-prerelease-cleanup branch July 18, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple prerelease cleanup from the module artifact so Publish-Module succeeds on no-build PRs

2 participants