Skip to content

CI: publish to the PowerShell Gallery on version tags - #84

Merged
christaylorcodes merged 1 commit into
masterfrom
ci/release-workflow
Nov 8, 2026
Merged

christaylorcodes merged 1 commit into
masterfrom
ci/release-workflow

Conversation

@christaylorcodes

Copy link
Copy Markdown
Owner

Pushing a vX.Y.Z tag on master now publishes the module to the PowerShell Gallery.

  • New .github/workflows/release.yml:
    • Runs the full CI test matrix first (5.1 and pwsh on Windows, pwsh on Ubuntu). ci.yml gains workflow_call so the release workflow can reuse it.
    • Then, in the production environment, it:
      • checks that the tag is on master and matches the manifest's ModuleVersion and Prerelease, and that the CHANGELOG has a dated section for the version;
      • publishes with Publish-PSResource, since Publish-Module can't pack this module: the per-command tag list is over NuGet's 4000-character limit;
      • creates a GitHub Release with the version's CHANGELOG section as the notes.
    • Re-running after a partial failure skips a version that is already on the Gallery.
  • CONTRIBUTING has a new "Releasing" section with the one-time setup (the Gallery key, the production environment and its secret) and the release steps.

Tested locally: the tag check passes for v0.5.0 and rejects v0.5.1, the release notes are extracted correctly, and the Gallery lookup finds 0.4.16 but not 0.5.0.

🤖 Generated with Claude Code

release.yml runs on vX.Y.Z (or vX.Y.Z-label) tags. It reuses the CI test
matrix (ci.yml gains workflow_call), then, in the production environment:
checks the tag is on master and matches ModuleVersion/Prerelease, checks the
CHANGELOG has a dated section, publishes with Publish-PSResource (Publish-Module
fails to pack: the per-command tag list is over NuGet's 4000-character limit),
and creates a GitHub Release from the CHANGELOG section. A re-run skips a
version already on the Gallery. Setup and steps in CONTRIBUTING "Releasing".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christaylorcodes
christaylorcodes merged commit 46d1deb into master Nov 8, 2026
4 checks passed
@christaylorcodes
christaylorcodes deleted the ci/release-workflow branch November 8, 2026 23:54
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.

1 participant