ci: run release on pushes to main via fixed publish.yaml#472
Merged
Conversation
Test Results 4 files 288 suites 1m 17s ⏱️ Results for commit 2530c19. |
Rename release.yml to publish.yaml and fix it so releases run on every push to main (the previous publish.yaml startup-failed on each main push, and the tag-triggered release.yml never ran and was itself broken). The reusable PowerShellOrg/.github powershell-release.yml@main is built for this model: its check_version job compares the manifest version against PSGallery and gates both create_release and publish on (version_bumped || force), so pushing to main only publishes when the manifest version is actually new. Fixes applied to the call: - Trigger on push to main instead of tags ['v*']. - Drop the module-name input, which the reusable workflow does not declare (it derives the module name itself); passing it caused a startup failure. - Pass the secret as PS_GALLERY_KEY (the reusable's required secret name) sourced from the repo's PS_GALLERY_KEY secret. release.yml previously passed a non-existent PSGALLERY_API_KEY. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2530c19 to
967ad5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make module releases run on every push to
main, replacing the two broken release workflows with a single fixed one.Both prior workflows were broken against the current reusable
PowerShellOrg/.github/.github/workflows/powershell-release.yml@main:publish.yaml(push-to-main) startup-failed on every push tomain— it passed anisPrereleaseinput that refactor(workflow): add dispatch inputs and replace isPrerelease with force #468 removed.release.yml(tag-triggered) never ran on merges and was itself broken: it passed amodule-nameinput the reusable workflow does not declare, and a non-existentPSGALLERY_API_KEYsecret.Approach
Rename
release.yml→publish.yamland fix it. The reusable workflow is designed for the push-to-mainmodel: itscheck_versionjob compares the manifestModuleVersionagainst PSGallery and gates bothcreate_releaseandpublishon(version_bumped || force). So running it on every push tomainonly actually tags/publishes when the manifest version is new — a normal merge that doesn't bump the version is a no-op.Changes
push: branches: [main](+workflow_dispatchfor manual/forcere-runs) instead ofpush: tags: ['v*'].module-name: Plasterinput — not declared by the reusable workflow (it derives the module name itself); passing it caused a startup failure.PS_GALLERY_KEY(the reusable's required secret name), sourced from the repo's existingPS_GALLERY_KEYsecret.release.yml.🤖 Generated with Claude Code